How to trigger task based workflow from custom table ?

Community Alums
Not applicable

Hi All,

We have a requirement to create one custom table which will have different fields as like cmdb ci tabl, And in the custom table we have different sections which will filled by different teams..

So once the record created we have create multiple tasks and assign them to the respective teams. So for that I have created on custom table A (consider ).

Since my custome table is not inheriting any task table, I am not able to see "Create task" activity. So for creating task, I have created one more table B (consider )which will inherit task table.

Now when ever record the created in my custom table A , I am trying to trigger the workflow which was defined on task table B. Below is the business rule which I defined on table A which will execute even ever record created on table A.

(function executeRule(current, previous /*null when async*/) {

  // Add your code here

  gs.log("executing", "Swamy_workflow");

  var w = new Workflow();

var context = w.startFlow('ce8098064f0032003accfa218110c70c', current, current.operation(), getVars());

  gs.log(context, "Swamy_workflow");

})(current, previous);

But when I created new record on table A, I could not see that table B's   workflow triggered. Am I missing anything ? Anyone could help me on this.

Thanks in advance.

Swamy

6 REPLIES 6

Hi Swamy. Did you ever figure this out? I have a very similar requirement that I have not been able to accomplish.


Community Alums
Not applicable

Hi Matt,



We could not figure out this. We left the custom table.



And we completed the requirement by creating a new custom table which extends Task table. So that we got all kind activities in workflow. And we hide the all fields which are came by extending task table, And we have created our required fields and made them visible on form to reach the client requirements .