OFBIZ workflow learning (3)

zhaozj2021-02-17  51

OFBIZ process operation usage process

1 process definition

The process definition is generally performed with JAWE. According to the information found, using the XPDL file generated by JAWE and the Workflow Engine has a little incompatible situation, the extracted summary is as follows:

1) JAWE Generates DataFields and the ActualParameter conflict with the OFBIZ IMPLEMENTATION TOOL, causing Runtime Data to get normal acquisition, if your TOOL needs ActualParameter, you can enter it directly, do not need to define it to become Workflow Relevant Data.

2) In the Activity's TransitionRef section, due to FK, IMPORT to DB modification method 1: Note Extreme XpdlReader ReadTransitionRestriction finally read the code of ReadTransitionRefs (because ofbiz workflow engine is not used in TransitionRefs, you can not comment directly) Modify 2 : Modify Entity Definition File: WorkflowTransitionRef with WorkflowTransition's Relationship Type To "One-Nofk"

3) In the TRANSTISTRICTION section of Activity, if Join / SPLIT TRANSION is only unique, JAWE does not generate a modification method for definition JOIN / SPLIT TYPE 1: Manual plus: Modification 2: Modify the XPDLReader code to make it default to xor

2 process loading

The OFBIZ provides a page to implement the process loading, as follows:

Figure process loading

3 process use

Ofbiz did not provide its own tool to illustrate the method of use, requiring developers to find the appropriate API to call; additional, ORDERMGR module, using a workflow engine, but not a pure workflow engine, it contains your own Independent complex business logic.

The rough process use steps are as follows:

1) Startup process

First, get the entity engine and service engine, usually get from the request of the page; then, call the entity engine to create a new workflow record; finally, call the service engine startup process.

2) Get a list of works

First, construct a constraint list using an EntityExPR class; then, the constraint list is passed to the entity engine to find the qualified record; the same method is used to find the part of the or this role or in this role or specified to my own work list.

3) Executive activities

First, call the workflow engine to determine whether the task is operated by the user or whether it has been accept; secondly, call the WorkflowClient class to get the process instance number, positioning process; then call the entity engine to get the data of the flow instance number; Finally, Call the workflow engine by process definition

Get the activity information and perform the appropriate activities.

转载请注明原文地址:https://www.9cbs.com/read-28867.html

New Post(0)