Orchestration Activity Designer Activity Inputs

Katie A
Mega Guru

Hello, I am building a custom activity using the Activity Designer.

I have an SSH command that will vary based on variables in a form.

How can set the values that go into the activityInput object?

I am setting the value of the workflow scratchpad in a "run script" activity that runs prior to the custom SSH activity.

workflow.scratchpad.generate_members_file = "echo -e 'hello world' > /tmp/hello.txt";

Then I am trying to pass in that value into the new custom activity. However, the value of that workflow scratchpad variable is not being passed in to the custom activity.

What is the correct way to do this?

activity_designer_1a.png

activity_designer_1.png

4 REPLIES 4

doddipatla
Kilo Contributor

Hi kda617



Initially I have suffered the same issue but I've figured it out see how


Step 1: Checkout the Workflow and go to Edit Inputs by clicking on ham burger symbol.


Selection_015.png


Step 2: Create Inputs over there(as may you required)



Step 3: Add them to activity by using ${workflow.inputs.name_of_Edit_Input}


Selection_016.png


Step 4: Using In business Rules, u_host is the hostname(IP)


Selection_017.png



And This solves the problem,



--Please Give Correct Answer, Helpful Based on Impact


Thank you! I have one more question. Is there a way to set the values in a Run Script activity in the workflow (instead of a business rule?) The workflow I am building is based on a Service Catalog Requested Item (sc_req_item) so there are no business rules involved.



Thanks!


Yes of course we can do that too but when do you need that activity in flow before or after the SSH Activity?


ngo
Kilo Contributor

Hi Dundi Vinayak



I would require these values from the variables of the Service Request


so suppose i have


1. name


2. password



then if i want to access these variables in the script of workflow then we have to write current.variables.variable_name


I want to know if the same would work in the below screenshot



find_real_file.png


And I am just starting with orchestration so i could use some help here , The object data should contain something like shown below


find_real_file.png


So how am i suppose to pass something like this in workflow input from Service Request , Should i use a business rule to process the variables information and pass it on in form above to the workflow input of object data



Please help as I am in a middle of a project trying to achieve something single handily



Thanks


Nitish Goel