Skip to content

Commit

Permalink
Updated README file.
Browse files Browse the repository at this point in the history
  • Loading branch information
aabiabdallah committed Mar 26, 2019
1 parent 195b8cf commit ffc027e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ $ ./gradlew getComponent -Pcomponent=moqui-workflow
Configuring the workflow engine involves these tasks.

* Define workflow types
* Expose entity fields
* Design a workflow
* Trigger workflow engine

### Define workflow types

Workflow types are stores in the `moqui.workflow.WorkflowType` entity and must be defined before the workflow engine is used.

You can define a new workflow type in your component seed data as follows:

```shell
$ <moqui.workflow.WorkflowType typeId="WF_EXAMPLE" typeName="Example Workflow" statusTypeId="ExampleStatus" primaryEntityName="moqui.example.Example" primaryViewEntityName="moqui.example.Example" primaryKeyField="exampleId"/>
```xml
<moqui.workflow.WorkflowType typeId="WF_EXAMPLE" typeName="Example Workflow" statusTypeId="ExampleStatus" primaryEntityName="moqui.example.Example" primaryViewEntityName="moqui.example.Example" primaryKeyField="exampleId"/>
```

A brief explanation of the workflow type fields can be found in the table below:
Expand All @@ -87,6 +87,15 @@ A brief explanation of the workflow type fields can be found in the table below:
| primaryViewEntityName | View entity used by the workflow engine for read operations |
| primaryKeyField | Entity primary key field name |

### Expose entity fields

You may not wish to expose all entity fields in the workflow designer. You can control this using the `moqui.entity.EntityField` entity.
You can define a new workflow type in your component seed data as follows:

```xml
<commons.entity.EntityField entityName="moqui.example.Example" fieldTypeEnumId="ENTITY_FLD_TEXT" fieldName="exampleName" displayName="Example Name"/>
```

### Design a workflow

> To be completed
Expand Down

0 comments on commit ffc027e

Please sign in to comment.