OS1 Services

Workflow Service

22min
introduction to workflow service workflow service lets you register workflow service docid 3yv38kxhtmuykxynkwcdr 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 workflow service docid 3yv38kxhtmuykxynkwcdr , workflow service docid 3yv38kxhtmuykxynkwcdr , workflow service docid 3yv38kxhtmuykxynkwcdr and its workflow service docid 3yv38kxhtmuykxynkwcdr 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 jobs and objectives 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 component name description id this is the et id, a unique human friendly string for the execution task name name defined for an execution task example collect, capture, scan, verify, etc input parameters input parameters allow you to pass a set of information during the invocation of an et for further use these parameters vary depending on the et example et collect amount to be collected from the consignee or allowed payment gateways et verify types of verification, i e , otp or id et capture size of the image to be captured output status & data an et has binary outcomes the two possible terminal statuses are et success and et failure both the status can return additional data with it to represent the outcome this data doesn't affect the workflow in any way this is just additional information captured and shared with other applications/systems example barcode value is returned with the output status in the case of ‘scan code’ 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 execution tasks that you can add to your workflow the table below includes all the execution tasks with ids use these ids while creating an workflow service docid 3yv38kxhtmuykxynkwcdr execution task execution task id functionality input parameters output on failure verifylocation etask 7f3897da 3a1f 5736 b8e5 5d9f131b13cd ability to verify if the rider is at a certain location 1 addressstring 2\ latitude 3\ longitude 4\ radius (for geofence confirmation) 5\ accuracyforgeolocation 1 success true/false 2\ eventcode wfs/wff 3\ reasoncode failure captureimage etask 9370d00a 8d84 5bf9 94bb cd8cc73eeeec ability to capture an image 1 image resolution 2\ filesizelimit 3\ capturemode \[single, multi] 4\ capturecountlimit 1 success true/false 2\ captures \[imageurl, timestamp] 3\ eventcode imgs/imgf 4\ reasoncode failure captureinput etask 7b5637cc 570e 5c9d b184 ecfbbd7c198d ability to capture a number or string input 1 inputtype string, number 2\ validationregex 1 success true/false 2\ value 3\ isvalid 4\ attemptcount 5\ eventcode cins/cinf 6\ reasoncode scan etask 28cba55d 2aad 5568 863a 9e7e645f8c7b ability to scan a barcode or qr code 1 scantype \[barcode, qrcode, both] 2\ scanmode single, multi 3\ scancountlimit4 validationregex 1 success true/false 2\ scans \[value, isvalid, timestamp] 3\ eventcode scans/scanf 4\ reasoncode failure doodle etask\ cea7c9a7 3ee7 52e9 ab3e 82849675d745 ability to capture a finger tip trace on the screen 1 pen colour 2\ filesizelimit 3\ dimension 1 success true/false 2 imageurlofdoodle3 eventcode dos/dof4 reasoncode failure form etask 80446347 ede5 5cf9 8e56 b3d59fda4b5c ability to collect multiple information in a custom defined form custom form json (question, question type, validations) 1 success true/false 2\ response \[answers] 3\ eventcode forms/formf 4\ reasoncode failure display etask 574ff9b0 c49c 5eb5 b550 8548ae0cab44 ability to display an alert message, information, warning, etc to the operator 1 displaytype \[alert, warning, message] 2\ text 3\ imageurl 1 success true/false 2\ eventcode diss/disf 3\ reasoncode failure pick etask 04d2414c ddc1 552e af02 78073dbb8ff7 pick (execution task) is when the inventory transfer is receivables (in) 1 items \[{sku, count, productdescription}] 2\ allowcustodyexchangetrue double confirmation would be required applicable for custody change false single confirmation only required applicable for normal pickup 1 success true/false 2\ remark text 3\ eventcode ps/pf 4\ reasoncode deliver etask\ dcac5d49 c54c 5c38 a780 ad2e9ba5e2e2 deliver (execution task) is when the inventory transfer is payables (out) 1 items \[{sku, count, productdescription}] 2\ allowcustodyexchange true double confirmation would be required applicable for a custody change false single confirmation only required applicable for normal pickup 1 success true/false 2\ remark text 3\ eventcode ds/df 4\ reasoncode start etask 952f3754 12e8 5ff2 93a8 aca383d18e56 ability to start a workflow it is mandatory 1 success true/false 2\ eventcode start/startf 3\ reasoncode completed success etask 134e93b4 49a8 59b9 bc6c 7bd9045728ff ability to define if the terminal endpoint of a workflow is successful 1 success true/false 2\ eventcode css/csf 3\ reasoncode completed failure etask\ e04ab83d 2a02 5970 ade9 e2a8a879b200 ability to define if the terminal endpoint of a workflow is failure 1 success true/false 2\ eventcode cfs/cff 3\ reasoncode initpayment etask 4eb8d36b 6762 5c53 aca6 95b1f4e3aa3f to instruct the app layer to initiate the payment flow with payment data 1 amount 2\ allowedpaymentmode 1 success true/false 2\ transactionid 3\ paymentmode 4\ eventcode inis/inif 5\ reasoncode processpayment etask 9a559375 02a5 50fe 9ce4 0a36df6f324e to process payment and generate transaction ids 1 amount 2\ allowedpaymentmode 1 success true/false 2\ transactionid 3\ collectedamount (incl currency) 4\ paymentmetadata 5\ eventcode pps/ppf 6\ reason completepayment etask 0e6c7bd7 c9ab 5b82 85b2 a054249bc1f1 to record final details of payments (tenant payid, transaction id, amount, etc) 1 expectedamount 2\ collectedamount 3\ transactionid 4\ tenanttransactionid 1 success true/false 2\ eventcode cps/cpf 3\ reasoncode verifyinput etask 6fc10a60 a144 5798 97f3 1f12e77f56e2 ability to verify if the given input matches the response from an api or static value 1 anyof input, value 2\ input, apiurl, jsonpathofvalue 3\ maxattemptallowed 4\ attemptcount 1 success true/false 2\ eventcode vis/vif 3\ reasoncode delivercash etask 2fffdf62 62b3 5e70 bd9e d4d2644ee2fe ability to deliver cash 1 expectedamount 1 success true/false 2\ eventcode 3\ reasoncode 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 component name description id this is the em id, a unique human friendly string for the execution macro name name defined for an execution macro example b2c pod, verifycustomer, delivercontainer, etc input parameters input parameters allow you to pass a set of information during the invocation of the first execution task in an execution macro output status an execution macro has binary outcomes the two possible terminal statuses can be em success and em failure note please don’t confuse them with et success and et failure system defined macros system defined macro macro id functionality input parameters output on failure collectpayment emacro\ c014eb65 8944 5320 8e51 dccad861a086 ability to collect specified amounts through allowed modes of payment this system defined macro is a combination of three tasks initpayment, process payment, and complete payment 1 amount 2\ allowedpaymentmode \["cash", "upi", "payment link"] 3\ tenanttransactionid 4\ transactionid5 collectedamount 1 success true/false 2\ paymentmeta 3\ transactionid 4\ eventcode wfs/wff5 reasoncode failure 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 register workflow endpoint before that, check out execution task & 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 member description validation data type name name of the workflow minlength 1 maxlength 24 pattern ^\[a za z0 9 ]{1,24}$ string description description of the workflow minlength 1 maxlength 150 string tag > name tag name minlength 1 maxlength 10 string tag > value tag value minlength 1 maxlength 10 string flows ets/ems for the workflow flows > next display the name of the execution task string flows > id unique id of the execution task string flows > description description of the execution task string task the task is to be performed if the condition is validated string input > $expr expression of defined inputs string input > $val value of the inputs oneof list of execution tasks that are allowed within this execution macro string, boolean, number 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 category attribute name data type expected purpose base tenant id uuid the id of the tenant to whom the workflow instance belongs base workflow id varchar this contains the system generated unique id for the workflow base inputs object input values of the variables used in the workflow to create to register an execution macro, call the 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 member description data type workflow workflow id string inputs dynamic inputs are provided at the time of creating workflow instance object { "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