Activity Variable Arguments
An activity may need to process variable counts of inputs or generate variable counts of outputs. To describe such variable number of arguments activity authors will use a specially named parameter. The parameter must be named …
Example 1
{
"id": "CombinePdf",
"engine": "Autodesk.AutoCAD+24_3",
"parameters": {
"...": {
"verb": "put" // will match any extra arguments as outputs in the workitem using verb "put"
},
"output": {
"verb": "put",
"description": "result",
"required": false,
"localName": "result.pdf"
}
}
}
Show More
Given the above activity, users can submit workitems as Combinator:
{
"activityId" : "mynickname.CombinePdf+prod",
"arguments" {
"output": {
"url" : "http://sample.com/result.pdf"
},
"result1" : {
"url": "http://sample.com/some.ext",
"localName":"some.ext"
},
"result2" : {
"url": "http://sample.com/some_more.ext",
"localName":"some_more.ext"
}
}
}
Show More
Example 2
{
"id": "VarArg",
"description": "An Activity with VarArg parameters",
"engine": "Autodesk.Revit+2023",
"commandLine": "dummy",
"parameters": {
"...": {
// will match any extra arguments in the workitem
},
"output": {
"zip": false,
"ondemand": false,
"verb": "put",
"description": "result",
"required": false,
"localName": "result.pdf"
},
"hostInput": {
"zip": false,
"ondemand": false,
"verb": "get",
"description": "host file",
"required": true,
"localName": "host.rvt"
}
}
}
Show More
Given the above activity, users can submit workitems as below:
{
"activityId" : "mynickname.VarArg+Latest",
"arguments" {
"hostInput": {
"url" : "http://sample.com/host.rvt"
},
"output": {
"url" : "http://sample.com/result.pdf",
},
"input1" : {
"url": "http://sample.com/moreinput.rvt", // No verb defined, will be assigned to "get"
},
"result1" : {
"url": "http://sample.com/some_more.ext",
"localName":"some_more.ext",
"verb": "put"
}
}
}
Show More