hi,
Can you shred some light on the best practice for desiging a State Machine Workflow. I have a business scenario.listed below.
1. Order Lifecycle goes through various stages of data Capture/entry (typically 4-5 screens).....review/approval ..... generating Invoice ..... approval ..... Final Copy being generated and stored.
2. At each stage ... the workflow state is named and mentioned and data is captured at every state.
We would like to know..which of the below two approaches should be taken for designing a state machine workflow.
1. The workflow starts on a item create in a sharepoint list and sets the initial state and creates a task for a user to take some action.
2. The user logs on to the system and uses a button on the page to take an action for the task created
3. Opens the forms and captures data ....the user interface provides code-behind for saving and retrieving of data and changing the record state of the list item.
4. and on Submit .... changes the workflow state to the next state.
Business logic for calculations, saving data ... retrieving data and updating the list item is part of the UI code-behind.
Do you think the business logic should be part of the form in the code-behind; or should we hve the business logic getting executed via workflow actions calling external services/code activity instead of the UI.
Should the User Interface manage the state changes of the workflow and the List item; or should the state change in the workflow should change the lIst item (record item) state change.
What is the best practice.
thanks
Sreeram