1.0.9 • Published 3 years ago
do-not-use-this-workflows-creator v1.0.9
An Angular Client to develop workflows using an intuitive statement based UI.
Installation
npm i do-not-use-this-workflows-creatorUsage
- Install the workflows-creator
npm i do-not-use-this-workflows-creator Import the
WorkflowBuilderModulein the required module -... imports: [ ... WorkflowBuilderModule, ... ],Use the component selector in your application -
<workflow-builder [(state)]="state" [(diagram)]="diagram" (eventAdded)="elementClick($event)" (actionAdded)="elementClick($event)" (itemChanged)="valueChanges($event)" ></workflow-builder>stateis the initial state objectdiagramis initial BPMN Diagram respectively.eventAdded- this event fires whenever a new event is added in the workflowactionAdded- this event fires whenever a new action is added in the workflowitemChange- this event fires whenever a user input changes
Configurations
Nodes
Each Statement is made up of nodes -
- Events - Triggers or Checks that lead to an action
- Action - Actually task performed by the workflow
You can create your own nodes by extending the
WorkflowNodeclass.- To register this node for use, provide it to the
BPMN_NODEStoken -
{provide: BPMN_NODES, useValue: CustomNode, multi: true},Element
- Each Node is based on certain base elements like tasks, gateways, etc.
- You can create your own BPMN Elements by extending the
BpmnElementclass. - You can also create any custom element by extending the
WorkflowElementclass(in case working with a non-BPMN workflow engine). - To register this element for use, provide it to the
BPMN_INPUTStoken -
{provide: BPMN_ELEMENTS, useValue: CustomElement, multi: true},Prompts
- Each Node also has some prompts or inputs from the users.
- You can create your own Prompt by extending the
WorkflowPromptclass. - To register this prompt for use, provide it to the token -
{provide: BPMN_INPUTS, useValue: CustomInput, multi: true},