Replies: 8 comments
-
@Bykiev No worries, I'm happy with the questions as it helps shape my priorities and understanding of people's use cases 👍 Perhaps you can explain a little bit more of your scenario? What you can do today is invoke a given workflow, which then executes that workflow. The The There's more to all of this, and I do intend to document how things work over the next couple of weeks and months. In the meantime, I'm happy to answer any questions you run into, so keep'm coming! |
Beta Was this translation helpful? Give feedback.
-
@sfmskywalker, thank you! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@sfmskywalker, thank you! I've also another case, it's looking like a standard approval process: after creating document manager can approve document by selecting 'Approved' status or decline by selecting 'Declined' status. In such case I need to get a list of possible transitions for user to fill status list (the real order could be changed by system administrator (a new status can be added and etc.), so I need to follow workflow states order), how to achieve it? |
Beta Was this translation helpful? Give feedback.
-
@Bykiev You got it. The standard approval process is a perfect example. With Elsa, you would add e.g. a User Action activity, that you can configure with allowed actions (e.g. "Approve", "Decline", "Needs Work", etc, some description maybe, and basically anything else that would be relevant for your scenario. I'll ensure that you'll be able to query workflow instances in all sorts of ways. For example, you'll be able to get a list of all workflow instances that are blocked on "User Action". You'll then be able to get the possible user actions for each such workflow instance, which enables you to e.g. render a UI with a list of tasks that a user need to review, and click on any of the available actions. Clicking an action will cause the workflow instance to be resumed with the clicked action. This UI & click handling will be up to you of course, but the library will provide the necessary APIs to achieve all this. |
Beta Was this translation helpful? Give feedback.
-
@sfmskywalker, awesome! Sorry, I didn't get the idea of using User Action activity, can you please explain it? All I need is a state machine and API
I see one more use case: in approval process the document should be approved by at least N persons, how to achieve it with Elsa? |
Beta Was this translation helpful? Give feedback.
-
@Bykiev No worries! So, the idea of the User Action activity is that it's a blocking activity (a trigger somewhere in your workflow). This means that in order for the workflow to continue, it needs to be resumed with a given action (one of the actions defined on the User Action itself). To resume such a workflow, your application will have to be able to query the workflow and the defined User Actions (associated with the User Action activity), so that your application can e.g. display these actions as buttons the user can click. Here's a demonstration of how that works in Orchard: https://www.youtube.com/watch?v=iioKQkXUwXA Regarding the number of required approvals, that too can be easily done using a While activity and the Hope this helps, but let me know if you're unsure about anything I mentioned. I'll be sure to write a tutorial on how to achieve this as soon as I got my ducks in a row with the refactoring that's going on atm. |
Beta Was this translation helpful? Give feedback.
-
Created issue for User Task here: #43 |
Beta Was this translation helpful? Give feedback.
-
In Windows WF we can get possible transitions in StateMachine workflows. How can I get possible transitions for specific instance and move to specific state with Elsa? Btw, what is the difference between Resume and Invoke methods? Sorry, lack of docs makes it hard to understand how to use this awesome library...
Beta Was this translation helpful? Give feedback.
All reactions