ExecutationServiceImpl is the core class of JBPM. With its user, you can start the workflow, so that the workflow enters the next node, and so on.
1. InvocationLog StartProcessInstance (Long DefinitionID, Map Variables,
String transitionname)
Function: Start a workflow sample. 1) Get a workflow definition according to DefinitionID and initialize a process instance;
2) Get the example of the root card and record the invocationLog in the token;
3) Process instance persistence;
4) Initialize the execution context;
5) If the actor is assigned an actor, the Actor is stored in the context;
6) Trigger the Process_Start event;
7) Find the transformation of the start state to receive the token.
Second, InvocationLog Endofstate (long tokenid, map variables,
String transitionname)
Function: Make the workflow into the next state. 1) Get the token from the database according to the tokenid;
2) Check if the token meets the certification requirements;
3) Create a record invocationLog;
4) Create run the context and initialize the context variable;
5) Trigger the State_leave event;
6) The conversion of the token status accepts the token;