Index
An Angular Client to develop workflows using an intuitive statement based UI.
Installation¶
Usage¶
- Install the workflows-creator
npm i @sourceloop/workflows-creator
-
Import the
WorkflowBuilderModule
in the required module -
-
Use the component selector in your application -
state
is the initial state objectdiagram
is 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
WorkflowNode
class. - To register this node for use, provide it to the
BPMN_NODES
token -
Element¶
- Each Node is based on certain base elements like tasks, gateways, etc.
- You can create your own BPMN Elements by extending the
BpmnElement
class. - You can also create any custom element by extending the
WorkflowElement
class(in case working with a non-BPMN workflow engine). - To register this element for use, provide it to the
BPMN_INPUTS
token -
Prompts¶
- Each Node also has some prompts or inputs from the users.
- You can create your own Prompt by extending the
WorkflowPrompt
class. - To register this prompt for use, provide it to the token -
Web Component¶
- This library is also available as a Web Component so users of frameworks like React and Vue can also integrate this workflow creator element in their application with minimal effort.
Installation¶
- In the node modules you can find two files relevant to the element -
workflows-element/element/workflows-element.js
&workflows-element/element/style.css
. How you serve and include these files in your non Angular project depend on the framework that you are using. For example, for Vanilla JS and HTML you can simply import the js and styles in your HTML ->
Usage¶
The web component accepts all the same inputs and services as the regular Angular Module, but instead of passing them through bindings and DI, you pass them as properties of the element as shown below.
NOTE: If envIdentifier
is required it must be provided in the global window
object as shown below, otherwise it will be rendered as undefined. This step is needed only in non-angular applications. For angular appplications it can be directly provided with the help of providers.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
|