3

Dears,

I have an issue that, I want to recall the argument. I already define it in a workflow. But I need to use it in another workflow in the same package.

I added Invoke Workflow to import the argument

I created a new variable and add it as default value

Is there any idea how to get the text from workflow to another workflow? Thanks in advance.

Sarah AH
  • 69
  • 1
  • 9

3 Answers3

4

You should consider your workflows as functions using Arguments as inputs and outputs. These Arguments need to be visible to the respected Workflow in order to be accepted.

Let me give you a simple example of 2 workflows passing one Argument form the first to the second:

  1. We have a sequence of 2 Workflows as follow:

enter image description here

  1. In Sequence we have one variable (desiredText) that will store the value of output variable from WorkFlow_1 and assign it to the input variable of WorkFlow_2:

enter image description here

  1. In Sequence and in Import Arguments of WorkFlow_1 we set the value of the output Argument (out_desiredText) to the local variable in Sequence we mentioned in step 2 (desiredText)

enter image description here

  1. Respectively in Import Arguments of WorkFlow_2 we set the values for the input Argument (in_desiredText) from the local variable (desiredText)

enter image description here

  1. WorkFlow_1 looks like (desiredText holds the value to be passed):

enter image description here

  1. WorkFlow_2 looks like (desiredText receives the value passed):

enter image description here

Hope this will clarify on how in/out Arguments are working.

1

You can send values from one workflow to another using Arguments. To do that you can try the following:

  1. Add invoke workflow file in your first workflow ( I can see from the images that you have already covered this part)
  2. Click edit arguments and create an argument with the same name and type.
  3. Finally if you create an argument with the same name and type in the arguments panel of your second workflow you should be able to access it.
NTP
  • 4,338
  • 3
  • 16
  • 24
  • @SarahAH Did you set the value of your argument on invoke workflow argument panel in your first workflow? – NTP Apr 10 '19 at 08:29
0

In the filteredDataSeq.xaml, create an argument out_TaxID in the arguments pane and assign it with a value.

Now get back to your invoke workflow file activity where you invoked the filteredDataSeq.xaml file and click on the Import Arguments button. Now you can see that the argument out_TaxID is imported and in the Value column create a new variable(ctrl+k), say tax_id and make sure its scope is the entire flowchart/sequence that you have used.

Create a new workflow say workflow2.xaml by using the invoke file activity and click on the Edit Arguments button and create a new argument, say in_TaxID and in the Value column, provide the previously created variable tax_id.

In workflow2.xaml create an argument in_TaxID(same name used in the previous step) in the arguments pane. Make sure the Type is same everywhere.

Now you can use the in_TaxID argument inside your

Dawn T Cherian
  • 4,968
  • 3
  • 24
  • 35