Skip to content

Commit

Permalink
Added demo seed data.
Browse files Browse the repository at this point in the history
Updated README file.
  • Loading branch information
aabiabdallah committed Mar 27, 2019
1 parent 117d16f commit 9ad4e0d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Extendable workflow engine for the [Moqui Framework](https://www.moqui.org).
- [Concepts](#concepts)
- [Installation](#installation)
- [Configuration](#configuration)
- [User Groups](#user-groups)
- [Artifact Groups](#artifact-groups)
- [Authors](#authors)
- [License](#license)

Expand Down Expand Up @@ -74,7 +74,7 @@ Workflow types are stores in the `moqui.workflow.WorkflowType` entity and must b
You can define a new workflow type in your component seed data as follows:

```xml
<moqui.workflow.WorkflowType typeId="WF_EXAMPLE" typeName="Example Workflow" statusTypeId="ExampleStatus" primaryEntityName="moqui.example.Example" primaryViewEntityName="moqui.example.Example" primaryKeyField="exampleId"/>
<moqui.workflow.WorkflowType typeId="WF_FOO" typeName="Foo Workflow" statusTypeId="FooStatus" primaryEntityName="moqui.test.Foo" primaryViewEntityName="moqui.test.Foo" primaryKeyField="fooId"/>
```

A brief explanation of the workflow type fields can be found in the table below:
Expand All @@ -94,12 +94,12 @@ You may not wish to expose all entity fields in the workflow designer. You can c
You can define a new workflow type in your component seed data as follows:

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

### Design a workflow

You can design workflow using the standalone [Workflow Designer](https://github.com/Netvariant/workflow-designer).
You can design workflows using the standalone [Workflow Designer](https://github.com/Netvariant/workflow-designer).

### Trigger workflow engine

Expand All @@ -115,9 +115,9 @@ You can start/stop workflow instances using Moqui services. The workflow engine

In a real life scenario you calling the above services using SECA/EECA rules.

## User Groups
## Artifact Groups

Loading the `moqui-workflow` component seed data will automatically create two user groups:
Loading the `moqui-workflow` component seed data will automatically create two artifact groups. Add them to your user groups to grant members access.

| Group Name | Description |
| :--- | :--- |
Expand Down
31 changes: 31 additions & 0 deletions data/DemoData.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- -->
<!-- NOTE: This file provides demo workflow setup, you can delete it -->
<!-- -->
<entity-facade-xml type="seed">

<!-- Foo status -->
<moqui.basic.StatusType statusTypeId="FooStatus" description="Foo Status"/>
<moqui.basic.StatusItem statusTypeId="FooStatus" statusId="FOO_STAT_PEND" sequenceNum="1" description="Pending"/>
<moqui.basic.StatusItem statusTypeId="FooStatus" statusId="FOO_STAT_PROGRESS" sequenceNum="2" description="In Progress"/>
<moqui.basic.StatusItem statusTypeId="FooStatus" statusId="FOO_STAT_DONE" sequenceNum="3" description="Done"/>
<moqui.basic.StatusItem statusTypeId="FooStatus" statusId="FOO_STAT_CANCEL" sequenceNum="4" description="Canceled"/>

<!-- Foo status flow -->
<moqui.basic.StatusFlow statusFlowId="FooStatusFlow" statusTypeId="FooStatus" description="Foo Status Flow"/>
<moqui.basic.StatusFlowItem statusFlowId="FooStatusFlow" statusId="FOO_STAT_PEND" isInitial="Y"/>
<moqui.basic.StatusFlowItem statusFlowId="FooStatusFlow" statusId="FOO_STAT_PROGRESS" isInitial="N"/>
<moqui.basic.StatusFlowItem statusFlowId="FooStatusFlow" statusId="FOO_STAT_DONE" isInitial="N"/>
<moqui.basic.StatusFlowItem statusFlowId="FooStatusFlow" statusId="FOO_STAT_CANCEL" isInitial="N"/>
<moqui.basic.StatusFlowTransition statusFlowId="FooStatusFlow" statusId="FOO_STAT_PEND" toStatusId="FOO_STAT_PROGRESS" transitionSequence="1" transitionName="Start"/>
<moqui.basic.StatusFlowTransition statusFlowId="FooStatusFlow" statusId="FOO_STAT_PROGRESS" toStatusId="FOO_STAT_DONE" transitionSequence="1" transitionName="Complete"/>
<moqui.basic.StatusFlowTransition statusFlowId="FooStatusFlow" statusId="FOO_STAT_PROGRESS" toStatusId="FOO_STAT_CANCEL" transitionSequence="2" transitionName="Cancel"/>

<!-- Plug workflow types -->
<moqui.workflow.WorkflowType typeId="WF_FOO" typeName="Foo Workflow" statusTypeId="FooStatus" primaryEntityName="moqui.test.Foo" primaryViewEntityName="moqui.test.Foo" primaryKeyField="fooId"/>

<!-- Plug entity fields -->
<moqui.entity.EntityField entityName="moqui.test.Foo" fieldTypeEnumId="ENTITY_FLD_TEXT" fieldName="fooId" displayName="Foo ID"/>
<moqui.entity.EntityField entityName="moqui.test.Foo" fieldTypeEnumId="ENTITY_FLD_TEXT" fieldName="fooText" displayName="Foo Text"/>

</entity-facade-xml>

0 comments on commit 9ad4e0d

Please sign in to comment.