Workflow Service consumes user input using Receive activities. Workflow does some work upon getting data from caller using business logic embedded in Workflow. This sounds great with one exception. How caller may know what is next Workflow step should be?
For example we have document processing Workflow.
New Workflow instance is created when document come to the system.
After creation, document can be validated by different managers, sent request for additional info, Reviewed, Closed, Canceled, Merged and etc. Order of possible operations is stored in workflow. Operations are performed outside of Workflow and communicated to workflow through several published Receive activity. Order of these Receive operation is inside Workflow (it is actually what Workflow is).
Logic may be different from department to department. So we do not want to hardcode it outside of our workflow.
Now document processing is in the following state:
- Previous
Receiveactivity was performed Workflowdid some work and now persisted- Workflow can be woke-up if User perform some operation and call next
Receiveactivity
The question is how external code may know what that operation is and what Receive end-point is waiting should be called?
Is there any easy way to ask Workflow what are possible next steps to use that information in GUI?