OS1 Services
Workflow Service
22 min
introduction to workflow service workflow service lets you register /#execution workflow using the existing execution tasks and execution macro updating an existing workflow within the service registers a new version of that workflow moreover, after the workflow expires, no additional updates to that workflow are allowed with this basic overview, let's get into the details regarding /#execution task , /#execution macro em , /#execution workflow and its /#execution workflow instance execution task an execution task (et) is the smallest atomic task that is performed by an operator the et has a binary outcome, i e , it can either succeed or fail an et can’t be canceled; only the et workflow or docid\ bewqlcaf54oqv9pmeonxw can be canceled some example execution tasks are scan, collect, verify, capture, stop, start, custody in, custody out, etc in an execution workflow, there are multiple execution tasks each task has its own unique id attached to it components of an execution task an execution task has the following components true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type every execution task has a completion mode this completion mode describes the outcome of an execution task which can either be a success or a failure with that, the et also has a reason code that describes the outcome of the task these are a set of pre defined descriptions based on the outcome of the task the delivery agent (da) mobile app exists on every fe’s device for every execution task, a corresponding pre coded module is expected in the app as part of sdk this module executes the task on the device running the da app in other words, the app already has a set of instructions for the fe telling him what to do at a particular stop the mobile app sdk orchestrates the execution of tasks states of an execution task an execution task has the following defined states pending active success failure obsolete the state of an execution task is defined by the task’s prerequisites the prerequisite field of an execution task is a collection of completion mode and other execution tasks the state of the execution task is implicit and does not need to be advanced by command or any other process it is primarily used by the ui to determine what to show the user the following example shows the progression of states of an et suppose there are two different execution tasks, i e , et 1 and et 2 et 1 has no prerequisites and et 2 is dependent upon et 1 having a completion mode of type ‘fail’ et 2 will become active when et 1 is marked completed with ‘fail’ and a completion mode is attached here is a simplified representation all execution tasks must end in success or failure however, it is possible to set a prerequisite for an execution task based on the reason code of a completion mode for another task it is, therefore, possible to have more than two divergent paths from a single execution task to perform execution tasks, its state must be ‘active’ if none of the execution tasks within a workflow remain active, the workflow reaches its terminal state default execution tasks the platform provides default https //docs getos1 com/execution task and macro payloads that you can add to your workflow the table below includes all the execution tasks with ids use these ids while creating an /#execution workflow true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type reversing execution tasks if needed, it is possible to undo execution tasks and go backward however, some actions or exchanges of custody in the course of executing the task should be reversed this allows for the correction of mistakes a worker might have made or reacting to changes in circumstances in the field some execution tasks are not reversible and must be defined as such if a reverse action is defined on an execution task, that action must be completed to modify the completion mode execution macro (em) you can combine one or more execution tasks together in a logical sequence that can be reused this is called an execution macro execution macros let the tenant create reusable blocks of templates for business flow components in other words, there might be a sequence of execution tasks that remain saved for recurring workflows in that case, rather than manually creating the same workflow over and over, you can create an execution macro and attach it wherever you need it in a workflow these reusable templates help to define a subset of the bigger logistical process these templates can be re used and can be edited in one place to allow the propagation of changes throughout the universe of the tenant this helps drive standardization for identical processes components of an execution macro the execution macro has the following components true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type system defined macros true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type example execution macro let's suppose, there is a tenant a with the following execution task workflows in his universe verifycustomer to correctly identify if the person receiving the package is authorized to collect it or not b2c pod to take the proof of delivery through a signature or photos delivercontainer to verify if the package picked by the operator is correct and then hand it over to the consignee a maximum of 3 retries is allowed for the operator to scan the correct package so, the complete execution workflow (verifycustomer+b2c pod+delivercontainer) has multiple execution tasks in it the execution tasks within verifycustomer et workflow are coupled together to form an execution macro similarly for b2c pod & delivercontainer as well these execution macros can be reused in multiple execution workflow execution task workflows, as a sequence of execution tasks, are illustrated below these individual templates are used as execution macros execution workflow the operator needs to perform a set of tasks in a pre defined manner the sequence of these execution tasks is defined as execution workflow every objective has an execution workflow attached to it to complete the objective, the operator needs to perform the execution workflow this execution workflow consists of one or more execution tasks and/or execution macros there is an execution workflow designer which is basically a browser based drag and drop tool it has all the defined execution tasks the tenant can further use the execution workflow designer to create and store execution workflows and execution macros here is a graphical representation of multiple execution tasks & execution macro forming an execution workflow to create to register an execution macro, call the https //docs getos1 com/reference/register workflow endpoint before that, check out https //docs getos1 com/execution task and macro payloads request bodies are specified in json format the following examples show a request body for registering an execution workflow 🚧 defining execution macro in an execution workflow defining execution macro in an execution workflow when you define an execution macro for a particular execution task in an execution workflow, please follow this format macro task example collectpayment initpayment here, the collectpayment is a macro that is used for the initpayment execution task 📘 entity, event, and reason codes entity, event, and reason codes check out the list of entity, event, and reason codes here true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type register an execution workflow { "name" "test cod latest 1", "description" "cod drop workflow", "tag" \[ { "name" "objective", "value" "drop" }, { "name" "mode", "value" "cod" } ], "flows" \[ { "name" "start", "id" "etask 952f3754 12e8 5ff2 93a8 aca383d18e56", "description" "start et", "next" \[ { "condition" "webwfstarted", "task" "webcollectpayment" }, { "condition" "wfstarted", "task" "collectpayment" }, { "condition" "wffailedverifylocation", "task" "verifylocation" }, { "condition" "wffailedform", "task" "form" }, { "condition" "wffaileddisplay", "task" "display" } ] }, { "name" "collectpayment", "id" "emacro\ c014eb65 8944 5320 8e51 dccad861a086", "description" "collect cash macro", "next" \[ { "condition" "paymentsuccess", "task" "doodle" }, { "condition" "paymentfailure", "task" "completed failure" } ] }, { "name" "webcollectpayment", "id" "emacro\ c014eb65 8944 5320 8e51 dccad861a086", "description" "collect cash macro for web", "next" \[ { "condition" "paymentsuccess", "task" "deliver" }, { "condition" "paymentfailure", "task" "completed failure" } ] }, { "name" "doodle", "id" "etask\ cea7c9a7 3ee7 52e9 ab3e 82849675d745", "description" "take signature", "next" \[ { "condition" "doodlesuccess", "task" "deliver" }, { "condition" "doodlefailed", "task" "captureimage" } ] }, { "name" "captureimage", "id" "etask 9370d00a 8d84 5bf9 94bb cd8cc73eeeec", "description" "capture image", "next" \[ { "condition" "captureimagesuccess", "task" "deliver" }, { "condition" "captureimagefailed", "task" "captureimage" } ] }, { "name" "deliver", "id" "etask\ dcac5d49 c54c 5c38 a780 ad2e9ba5e2e2", "description" "deliver", "next" \[ { "condition" "deliversuccess", "task" "completed success" }, { "condition" "deliverfailed", "task" "returnpayment" } ] }, { "name" "returnpayment", "id" "etask 2fffdf62 62b3 5e70 bd9e d4d2644ee2fe", "description" "drop cash et", "next" \[ { "condition" "dropsuccess", "task" "completed failure" }, { "condition" "dropfailed", "task" "returnpayment" } ] }, { "name" "form", "id" "etask 80446347 ede5 5cf9 8e56 b3d59fda4b5c", "description" "form et", "next" \[ { "condition" "formsuccess", "task" "completed failure" }, { "condition" "formfailed", "task" "form" } ] }, { "name" "display", "id" "etask 574ff9b0 c49c 5eb5 b550 8548ae0cab44", "description" "display et", "next" \[ { "condition" "displaysuccessrescheduled", "task" "form" }, { "condition" "displaysuccess", "task" "completed failure" } ] }, { "name" "verifylocation", "id" "etask 7f3897da 3a1f 5736 b8e5 5d9f131b13cd", "description" "verify location", "next" \[ { "condition" "verifylocationsuccess", "task" "completed failure" }, { "condition" "verifylocationfailed", "task" "completed failure" } ] }, { "name" "completed success", "id" "etask 134e93b4 49a8 59b9 bc6c 7bd9045728ff", "description" "success et", "next" \[] }, { "name" "completed failure", "id" "etask\ e04ab83d 2a02 5970 ade9 e2a8a879b200", "description" "failure et", "next" \[] } ], "inputs" { "doodle" { "$val" { "resolution" { "$val" { "length" { "$expr" "$ inputs resolution length", "$val" 512 }, "breadth" { "$expr" "$ inputs resolution breadth", "$val" 512 } } }, "filesizelimit" { "$expr" "$ inputs filesizelimit", "$val" 500 }, "title" { "$expr" "$ inputs doodletitle", "$val" "customer signature" }, "message" { "$expr" "$ inputs doodlemessage", "$val" "please ensure that the signature is clear" }, "applicablereasons" { "$val" { "e 010" { "$val" \[] }, "e 011" { "$val" \[] } } } } }, "captureimage" { "$val" { "resolution" { "$val" { "length" { "$expr" "$ inputs resolution length", "$val" 512 }, "breadth" { "$expr" "$ inputs resolution breadth", "$val" 512 } } }, "filesizelimit" { "$expr" "$ inputs filesizelimit", "$val" 500 }, "capturemode" { "$expr" "$ inputs capturemode", "$val" "single" }, "title" { "$expr" "$ inputs captureimagetitle", "$val" "photo of delivered package" }, "message" { "$expr" "$ inputs captureimagemessage", "$val" "please ensure that the photo clicked is clear and has a well lit background" }, "applicablereasons" { "$val" { "e 010" { "$val" \[] }, "e 011" { "$val" \[] } } } } }, "deliver" { "$val" { "items" { "$expr" "$ inputs items" }, "title" { "$expr" "$ inputs delivertitle", "$val" "complete delivery" }, "message" { "$expr" "$ inputs delivermessage", "$val" "confirm delivery of, " }, "confirmcustodyexchange" { "$val" false }, "applicablereasons" { "$val" { "e 010" { "$val" \[ "r 0041", "r 0042", "r 0043" ] }, "e 011" { "$val" \[ "r 0027" ] } } } } }, "returnpayment" { "$val" { "expectedamount" { "$expr" "$ inputs amount" }, "title" { "$expr" "$ inputs returnpaymenttitle", "$val" "return cash" }, "message" { "$expr" "$ inputs returnpaymentmessage", "$val" "cash to be returned" }, "confirmcustodyexchange" { "$val" false }, "applicablereasons" { "$val" { "e 010" { "$val" \[ "r 0027" ] }, "e 011" { "$val" \[] } } } } }, "form" { "$val" { "jsonschema" { "$expr" "$ inputs jsonschema", "$val" { "type" { "$val" "object" }, "required" { "$val" \[ "rescheduledate" ] }, "properties" { "$val" { "rescheduledate" { "$val" { "type" { "$val" "string" } } } } } } }, "uischema" { "$expr" "$ inputs uischema", "$val" { "rescheduledate" { "$val" { "ui\ widget" { "$val" "datepicker" }, "ui\ options" { "$val" { "mode" { "$val" "date" } } } } } } }, "title" { "$expr" "$ inputs formtitle", "$val" "reschedule delivery" }, "message" { "$expr" "$ inputs formmessage", "$val" "please confirm next delivery date" }, "applicablereasons" { "$val" { "e 010" { "$val" \[] }, "e 011" { "$val" \[] } } } } }, "display" { "$val" { "displaytype" { "$val" "message" }, "text" { "$val" "decision gateway" }, "title" { "$val" "dummy et" }, "applicablereasons" { "$val" { "e 010" { "$val" \[] }, "e 011" { "$val" \[] } } } } }, "verifylocation" { "$val" { "geolocation" { "$val" { "geofencing" { "$val" { "radius" { "$val" 200 } } }, "latitude" { "$expr" "$ inputs geolocation latitude" }, "longitude" { "$expr" "$ inputs geolocation longitude" } } }, "title" { "$expr" "$ inputs verifylocationtitle", "$val" "verify location" }, "message" { "$expr" "$ inputs verifylocationmessage", "$val" "enable location acceess to proceed" }, "applicablereasons" { "$val" { "e 010" { "$val" \[ "r 0022", "r 0023", "r 0024", "r 0025", "r 0026", "r 0027", "r 0028", "r 0029" ] }, "e 011" { "$val" \[ "r 0024", "r 0025", "r 0026", "r 0027" ] } } } } }, "collectpayment initpayment" { "$val" { "amount" { "$expr" "$ inputs amount" }, "allowedmodes" { "$val" \[ "cash" ] }, "title" { "$val" "collect payment" }, "applicablereasons" { "$val" { "e 010" { "$val" \[] }, "e 011" { "$val" \[ "r 0020" ] } } } } }, "collectpayment processpayment" { "$val" { "amount" { "$expr" "$ inputs amount" }, "paymentmode" { "$val" "cash" }, "title" { "$val" "processing payment" }, "transactionid" { "$expr" "$ collectpayment initpayment output transactionid" }, "applicablereasons" { "$val" { "e 010" { "$val" \[] }, "e 011" { "$val" \[ "r 0020" ] } } } } }, "collectpayment completepayment" { "$val" { "expectedamount" { "$expr" "$ inputs amount" }, "collectedamount" { "$expr" "$ collectpayment processpayment output collectedamount" }, "transactionid" { "$expr" "$ collectpayment processpayment output transactionid" }, "tenanttransactionid" { "$expr" "$ collectpayment processpayment output tenanttransactionid" }, "paymentmode" { "$expr" "$ collectpayment processpayment output paymentmode" }, "title" { "$val" "payment received" }, "applicablereasons" { "$val" { "e 010" { "$val" \[] }, "e 011" { "$val" \[ "r 0020" ] } } } } }, "webcollectpayment initpayment" { "$val" { "amount" { "$expr" "$ inputs amount" }, "allowedmodes" { "$val" \[ "cash" ] }, "title" { "$val" "collect payment" }, "applicablereasons" { "$val" { "e 010" { "$val" \[] }, "e 011" { "$val" \[ "r 0020" ] } } } } }, "webcollectpayment processpayment" { "$val" { "amount" { "$expr" "$ inputs amount" }, "paymentmode" { "$val" "cash" }, "title" { "$val" "processing payment" }, "transactionid" { "$expr" "$ webcollectpayment initpayment output transactionid" }, "applicablereasons" { "$val" { "e 010" { "$val" \[] }, "e 011" { "$val" \[ "r 0020" ] } } } } }, "webcollectpayment completepayment" { "$val" { "expectedamount" { "$expr" "$ inputs amount" }, "collectedamount" { "$expr" "$ webcollectpayment processpayment output collectedamount" }, "transactionid" { "$expr" "$ webcollectpayment processpayment output transactionid" }, "tenanttransactionid" { "$expr" "$ webcollectpayment processpayment output tenanttransactionid" }, "paymentmode" { "$expr" "$ webcollectpayment processpayment output paymentmode" }, "title" { "$val" "payment received" }, "applicablereasons" { "$val" { "e 010" { "$val" \[] }, "e 011" { "$val" \[ "r 0020" ] } } } } }, "start" { "$val" { "applicablereasons" { "$val" { "e 010" { "$val" \[] }, "e 011" { "$val" \[ "r 0013", "r 0014" ] } } } } }, "completed success" { "$val" { "applicablereasons" { "$val" { "e 010" { "$val" \[ "r 0072" ] } } } } }, "completed failure" { "$val" { "applicablereasons" { "$val" { "e 010" { "$val" \[ "r 0073" ] } } } } } }, "conditions" { "wfstarted" { "and" \[ { "==" \[ "$ output entitycode", "0006" ] }, { "==" \[ "$ output eventcode", "e 010" ] } ] }, "webwfstarted" { "and" \[ { "==" \[ "$ output entitycode", "0006" ] }, { "==" \[ "$ output eventcode", "e 010" ] }, { "==" \[ "$ output reasoncode", "r 0100" ] } ] }, "paymentfailure" { "or" \[ { "and" \[ { "==" \[ "$ output entitycode", "0017" ] }, { "==" \[ "$ output eventcode", "e 011" ] }, { "==" \[ "$ output reasoncode", "r 0020" ] } ] }, { "and" \[ { "==" \[ "$ output entitycode", "0018" ] }, { "==" \[ "$ output eventcode", "e 011" ] } ] }, { "and" \[ { "==" \[ "$ output entitycode", "0019" ] }, { "==" \[ "$ output eventcode", "e 011" ] } ] } ] }, "paymentsuccess" { "and" \[ { "==" \[ "$ output entitycode", "0019" ] }, { "==" \[ "$ output eventcode", "e 010" ] } ] }, "wffailedverifylocation" { "and" \[ { "==" \[ "$ output entitycode", "0006" ] }, { "==" \[ "$ output eventcode", "e 011" ] }, { "==" \[ "$ output reasoncode", "r 0014" ] } ] }, "wffailedform" { "and" \[ { "==" \[ "$ output entitycode", "0006" ] }, { "==" \[ "$ output eventcode", "e 011" ] }, { "==" \[ "$ output reasoncode", "r 0013" ] } ] }, "wffaileddisplay" { "and" \[ { "==" \[ "$ output entitycode", "0006" ] }, { "==" \[ "$ output eventcode", "e 011" ] }, { "==" \[ "$ output reasoncode", "r 0100" ] } ] }, "doodlesuccess" { "and" \[ { "==" \[ "$ output entitycode", "0014" ] }, { "==" \[ "$ output eventcode", "e 010" ] } ] }, "doodlefailed" { "and" \[ { "==" \[ "$ output entitycode", "0014" ] }, { "==" \[ "$ output eventcode", "e 011" ] } ] }, "captureimagesuccess" { "and" \[ { "==" \[ "$ output entitycode", "0011" ] }, { "==" \[ "$ output eventcode", "e 010" ] } ] }, "captureimagefailed" { "and" \[ { "==" \[ "$ output entitycode", "0011" ] }, { "==" \[ "$ output eventcode", "e 011" ] } ] }, "deliversuccess" { "and" \[ { "==" \[ "$ output entitycode", "0010" ] }, { "==" \[ "$ output eventcode", "e 010" ] }, { "or" \[ { "==" \[ "$ output reasoncode", "r 0041" ] }, { "==" \[ "$ output reasoncode", "r 0042" ] }, { "==" \[ "$ output reasoncode", "r 0043" ] } ] } ] }, "deliverfailed" { "and" \[ { "==" \[ "$ output entitycode", "0010" ] }, { "==" \[ "$ output eventcode", "e 011" ] }, { "==" \[ "$ output reasoncode", "r 0027" ] } ] }, "dropsuccess" { "and" \[ { "==" \[ "$ output entitycode", "0022" ] }, { "==" \[ "$ output eventcode", "e 010" ] }, { "==" \[ "$ output reasoncode", "r 0027" ] } ] }, "dropfailed" { "and" \[ { "==" \[ "$ output entitycode", "0022" ] }, { "==" \[ "$ output eventcode", "e 011" ] } ] }, "formsuccess" { "and" \[ { "==" \[ "$ output entitycode", "0015" ] }, { "==" \[ "$ output eventcode", "e 010" ] } ] }, "formfailed" { "and" \[ { "==" \[ "$ output entitycode", "0015" ] }, { "==" \[ "$ output eventcode", "e 011" ] } ] }, "displaysuccessrescheduled" { "and" \[ { "==" \[ "$ output entitycode", "0013" ] }, { "==" \[ "$ output eventcode", "e 010" ] }, { "==" \[ "$ output reasoncode", "r 0013" ] } ] }, "displaysuccess" { "and" \[ { "==" \[ "$ output entitycode", "0013" ] }, { "==" \[ "$ output eventcode", "e 010" ] }, { "or" \[ { "==" \[ "$ output reasoncode", "r 0022" ] }, { "==" \[ "$ output reasoncode", "r 0023" ] }, { "==" \[ "$ output reasoncode", "r 0024" ] }, { "==" \[ "$ output reasoncode", "r 0025" ] }, { "==" \[ "$ output reasoncode", "r 0026" ] }, { "==" \[ "$ output reasoncode", "r 0027" ] }, { "==" \[ "$ output reasoncode", "r 0028" ] }, { "==" \[ "$ output reasoncode", "r 0029" ] } ] } ] }, "verifylocationsuccess" { "and" \[ { "==" \[ "$ output entitycode", "0021" ] }, { "==" \[ "$ output eventcode", "e 010" ] }, { "or" \[ { "==" \[ "$ output reasoncode", "r 0022" ] }, { "==" \[ "$ output reasoncode", "r 0023" ] }, { "==" \[ "$ output reasoncode", "r 0024" ] }, { "==" \[ "$ output reasoncode", "r 0025" ] }, { "==" \[ "$ output reasoncode", "r 0026" ] }, { "==" \[ "$ output reasoncode", "r 0027" ] }, { "==" \[ "$ output reasoncode", "r 0028" ] }, { "==" \[ "$ output reasoncode", "r 0029" ] } ] } ] }, "verifylocationfailed" { "and" \[ { "==" \[ "$ output entitycode", "0021" ] }, { "==" \[ "$ output eventcode", "e 011" ] }, { "or" \[ { "==" \[ "$ output reasoncode", "r 0024" ] }, { "==" \[ "$ output reasoncode", "r 0025" ] }, { "==" \[ "$ output reasoncode", "r 0026" ] }, { "==" \[ "$ output reasoncode", "r 0027" ] } ] } ] } }, "canmerge" false } execution workflow instance a workflow instance is a workflow id plus the input data for executing the workflow attributes of an execution workflow instance the execution workflow instance are categorized as the following true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type to create to register an execution macro, call the https //docs getos1 com/reference/create workflow instance endpoint request bodies are specified in json format the following examples show a request body for creating an instance of a workflow true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type { "workflow" "{{workflowid}}", "inputs" { "items" \[ { "skuid" "id" } ] } } multi objective workflows you can manage multi objective runs in your workflows this feature allows app developers to process multiple objectives (such as shipments or orders) simultaneously or sequentially enabling multi objective workflows to enable multi objective workflows, you'll need to set the enablemultiobjectiveflow parameter to true while creating a workflow draft see the example below { "name" "mapping workflow one", "tag" \[ { "name" "objective", "value" "drop" }, { "name" "mode", "value" "prepaid" } ], "flows" \[], "meta" { "enablemultiobjectiveflow" true } } by setting this parameter, the workflow sdk will expose configuration settings for selected execution tasks in the workflow using multi objective workflows when working with multi objective workflows, ensure the following objective types the objectives to be merged are of the same type grouping logic implement suitable grouping business logic at the app code level, as the workflow service doesn't provide its own grouping logic timing and actions manage the timing of objective grouping and the resulting actions within the app for example, when dealing with packages requiring otp validation, group the objectives before generating and sending the otp the otp generation and sending should occur only once