{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":37429,"path":"order-management/define-jm-enabled-fulfillment-flows.md","title":"Define Jeopardy-enabled fulfillment workflows","bundle":null,"doc_type":null,"release":"australia","body":"\n# Define Jeopardy-enabled fulfillment workflows\n\nCreate jeopardy-enabled fulfillment workflows using Workflow Studio. The workflows enable Jeopardy Management to track task completion times and manage risk.\n\n## Before you begin\n\nRole required: admin\n\n## About this task\n\nCreating fulfillment flows starts with defining subflows in Workflow Studio using unique actions developed for Jeopardy Management.\n\nThe following Workflow Studio actions are used to create Jeopardy Management flows:\n\n-   Create Order Planned Task\n-   All Place Holder Tasks Created for Domain Order\n-   Set Task Relationships\n-   All Relationships Created for Order Tasks on Domain Order\n-   Set Order Task State\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Process Automation** &gt; **Flow Designer**.\n\n    Workflow Studio opens in a separate window.\n\n2.  Select **Subflows** and do one of the following:\n\n    -   Search for existing subflows that you want to edit.\n    -   Start a new flow by selecting **New** &gt; **Subflow**.\n3.  Give the subflow a name and provide any additional information.\n\n4.  Select the **Build subflow** action.\n\n5.  Build the Jeopardy Management subflow using the following actions:\n\n6.  <table id=\"table_ykg_nwz_dyb\"><thead><tr><th>\n\nOrder flow action\n\n</th><th>\n\nDefinition\n\n</th></tr></thead><tbody><tr><td>\n\nCreate Order Planned Task\n\n</td><td>\n\nCreates an order task and provides the option to establish task relationship with an existing order task. The Create Order Planned Task action extends planned tasks to Jeopardy Management.\n\n</td></tr><tr><td>\n\nAll Placeholder Tasks Created for Domain Order\n\n</td><td>\n\nSets the domain order stage to all order tasks created, so order tasks created by other subflows can have relationships created with current flow order tasks.\n\n</td></tr><tr><td>\n\nSet Task Relationship\n\n</td><td>\n\nSets the relationship between two order tasks by creating a record in the planned\\_task\\_rel\\_planned\\_task table. The table calculates the order line item runtime and the order task jeopardy calculations.\n\n</td></tr><tr><td>\n\nAll Relationships Created for Order Tasks on Domain Orders\n\n</td><td>\n\nIntroduces the domain order all\\_relationship\\_set and sets the field to true in the subflow when all task relationships are established.\n\n</td></tr><tr><td>\n\nSet Task Order State\n\n</td><td>\n\nThe flow action checks if an order task has a previous state value and uses the previous state to update the order task state during inflight state change.\n\n The Set the Order Task State action checks to see if an order task has a previous state value and uses the previous state to update the order task state during inflight state changes.\n\n</td></tr></tbody>\n</table>    **Note:** For more information about building subflows, see [Building subflows](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/build-workflows/subflows.md).\n\n7.  Test the flow by selecting **Test**.\n\n8.  Publish the flow by selecting **Publish**.\n\n\n## What to do next\n\n[Configure the Order Task Duration Assignment Policy](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/order-management/configure-order-task-duration-assignment-policy.md).\n\n**Related topics**  \n\n\n[Jeopardy Management](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/order-management/jeopardy-management.md)\n\n[Monitoring order jeopardy](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/order-management/monitoring-jeopardy-management.md)\n\n"}}