Designing Workflow Event Types
If we extract each unique event type from the above table, we end up with the following:
Workflow Event Type |
---|
Validate notification - consumption history request |
Confirm requester is a valid service provider for the customer's service |
Create notification download - send consumption history |
Validate notification - supplier switch |
Current supplier confirmation |
Change rate |
Create notification download - reject request |
Next, we have to determine the algorithm that will be used when each event is activated on its trigger date. We call this algorithm the activation algorithm. An activation algorithm is a stand-alone routine that does whatever you need done when an event is activated. We have populated the following table with brief descriptions of the types of activation algorithms you'd need for the above workflow events.
Workflow Event Type | Activation Algorithm |
---|---|
Validate notification - consumption history request | Validate consumption history request |
Confirm requester is a valid service provider for the customer's service | Confirm service provider is valid requester |
Create notification download - send consumption history | Create notification download - send consumption history |
Validate notification - supplier switch | Validate supplier switch request |
Current supplier confirmation | Create notification download - check if it's OK to switch customer from current supplier |
Switch supplier | Switch supplier |
Change rate | Change rate |
Create notification download - reject request | Create notification download - reject request |
Next, we have to determine which types of events can fail. Refer to Some Workflow Events May Fail for background information failure. For those types of events that can fail, we will indicate their failure algorithm in the table. A failure algorithm is a stand-alone routine that does whatever you need none when an event fails. We have populated the following table with brief descriptions of the types of failure algorithms you'd need for the above workflow events.
Workflow Event Type | Activation Algorithm | Failure Algorithm |
---|---|---|
Validate notification - consumption history request | Validate consumption history request | Create notification download - invalid request |
Confirm requester is a valid service provider for the customer's service | Confirm service provider is valid requester | Create notification download - invalid requester |
Create notification download - send consumption history | Create notification download - send consumption history | N/A |
Validate notification - supplier switch | Validate supplier switch request | Create notification download - invalid request |
Current supplier confirmation | Create notification download - check if it's OK to switch customer from current supplier | Create notification download - reject request due to supplier rejection |
Change rate | Change rate | N/A |
Create notification download - reject request | Create notification download - reject request | N/A |
And finally, for those events whose activation algorithm puts them into a wait state, we have to determine the waiting process that monitors the waiting events. Refer to Waiting Events And Their Waiting Process for more information about waiting.
Workflow Event Type | Activation Algorithm | Failure Algorithm | Waiting Process |
---|---|---|---|
Validate notification - consumption history request | Validate consumption history request | Create notification download - invalid request | N/A |
Confirm requester is a valid service provider for the customer's service | Confirm service provider is valid requester | Create notification download - invalid requester | N/A |
Create notification download - send consumption history | Create notification download - send consumption history | N/A | N/A |
Validate notification - supplier switch | Validate supplier switch request | Create notification download - invalid request | N/A |
Current supplier confirmation | Create notification download - check if it's OK to switch customer from current supplier | Create notification download - reject request due to supplier rejection | Check if supplier has accepted process |
Change rate | Change rate | N/A | N/A |
Create notification download - reject request | Create notification download - reject request | N/A | N/A |