This package has been deprecated

Author message:

creating new package with LTS release

workflow_sdk

1.0.39 • Public • Published

#WORKFLOW SDK ###NOTE THIS IS JUST TEMPORARILY DOCUMENTATION AND WILL BE UPDATE SOON. ####All methods build with bluebird promise dependancy.

##CONTAINER:

  • What is Container, container is just a vessel which contains the data from activity to another in single workflow.

  • Container methods as mentioned below:

  1. create: "create container"
  2. getDetails: "get container details".
  3. update: "update container according to activity status".
    let client = require('workflow_sdk');

    let container = {
            name: 'C01',
            data: {
                test: 'test3',
                test2: 'test4'
            }
    };

    //create Container
    client.container.create(container);

    //get container details
    console.log(client.container.getDetails('C01'));

    //update container
    client.container.update(container);

##ACTIVITIES:

  • workflow methods as mentioned below:
  1. forward
  2. reject
  3. getDetails
  4. updateActivity
  5. updateQueuedItem
  6. getActivitiesByPerformers
  7. findActivity
  8. findActivitiesByWfId
  9. createQueuedItem
  10. findQueuedItemsByProcessId
  11. cancel
  12. getQueuedItemsByPerformers
  13. getQueuedItemCount
    let client = require('workflow_sdk');

    client.activity.forward(2,container);

    client.activity.reject(2);

    client.activity.getQueuedItemsByPerformers(2)
    .then(result=>{
        console.log(result);
    })
    .catch(err=>{
        throw err;
    });

##WORKFLOW:

  • workflow is a template which workflow designer to set all activities required based on business requirements.

  • workflow methods as mentioned below:

  1. initiate
  2. cancel
  3. finish
  4. getDetails
  5. update
  6. findWorkflowById
  7. createProcess
    //initiate workflow which will create 'Process' as an 
    //instance of this workflow and its activities as queuedItems.
    let client = require('workflow_sdk');
    client.workflow.initiate(workflowId);

    //finish process
    client.workflow.finish(processId);

    //cancel process
    client.workflow.cancel(processId);

    //update process data
    client.workflow.update(processId, {
        name:'instance',
        status:'dormant',
        workflow_template:'01',
        packages:'02',
    });

    //find workflow by Id
    client.workflow.findWorkflowById(wfId);

    //create process
    client.workflow.create({
        name:'instance',
        status:'dormant',
        workflow_template:'01',
        packages:'02',
    });

Readme

Keywords

none

Package Sidebar

Install

npm i workflow_sdk

Weekly Downloads

3

Version

1.0.39

License

ISC

Unpacked Size

28.6 kB

Total Files

22

Last publish

Collaborators

  • npm
  • mohamed.nasr