Re : Urgent Need for SOAP Exchange

Re : Urgent Need for SOAP Exchange

I am very new to ALL of this, but was able to create a web service which can control an orchestration tool.  I am attempting to leverage one of the actions, but there is a requirement that all of the parameters be sent in an array (record list).  The reference API gives guidance:

Input Parameters Defined:

WorkflowTokenAttribute[] attributes = new WorkflowTokenAttribute[1];
WorkflowTokenAttribute attribute = new WorkflowTokenAttribute();
attributes[0] = attribute;

Input Parameters Called:
WorkflowToken token = vsoWebControl.executeWorkflow(workflowId, username, password,
I have two parameters which must be sent via the web service, foldername and clustername.  I can set those just fine, manually if need be - but I do not know how to send an array which includes these parameters using the expression editor.  Here is the shot of the reference web service action:

And of the workflowInputs Attributes that must send the actual parameters (foldername && clustername):

If someone could please help me, I have an urgent deadline to meet.

In the place you call this action from, create a local variable of type "RecordList" and use a definition of "WorkflowTokenAttribute". Add items to that list using the ListAppend action in System (you should do Add/Remove References to get it). DO NOT USE THE .Current OF THE RECORD LIST. That is only valid for a list that 1) already has data in it and 2) in the process of being iterated over! Instead, create another local variable of type WorkflowTokenAttribute, populate it with data, then ListAppend it to the record list. Feel free to do this in a For/Each over another list that has the data you are pushing to the service, of course, if you need to push multiple items in. Finally, call executeWorkflow and pass in the various parameters and your local record list.

Thank you so much!  I completed the steps above and it appears the variables aren't being passed.  Here's the guidance from the docs:

1).  Run the workflow by calling the executeWorkflow operation.
2.)  To run a workflow, you pass the workflow attributes to the executeWorkflow operation in the form of a WorkflowTokenAttribute array.
3.)  Running a workflow creates a WorkflowToken object, which represents the instance of the workflow that runs with the specific input parameters that it receives when it starts.
4.)  WorkflowToken token = vsoWebControl.executeWorkflow(workflowId, username, password,attributes);

In the preceding example, the attributes property is the array of WorkflowTokenAttribute objects created (SEE ORIGINAL POST)

So I have two primary "parameters" which 3 variable values represented: name, type & value.  Example: = name
Datacenter.type = string
Datacneter.value = datacenter123

I created all the local variables as you explained

And created an AppendList action for each:

The workspace validates when I add the list into the WorkflowTokenAtrtibute (THANK YOU):

But I throw an exception when configured this way as it gives me 'null' value for name.  So I created a simple table list on the main page and added the output of that to the workflowInputs value

Now it will not throw an exception.  BUT....the parameters aren't being passed and I'm getting 'null' values:

Thank you so much in advance!