ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Steps to collect user input from TDM Portal and pass it to a Javelin flow in a Pre Process actions

book

Article ID: 239294

calendar_today

Updated On:

Products

CA Agile Requirements Designer CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

We have a Javelin flow that we are executing in a pre-process action on a generator.

we need to pass user input to the Javelin flow for execution options.

this allows us to control the environment the javelin flow will work with.

Cause

Currently, in the TDM Portal 4.9.1.X and 4.10.X, when using a Javelin workflow for a pre-process generator operation you can only use the javelin default values that are either stored in the flow itself or if you export the variables and upload them into the portal for a different set at run time.


You can not set up a self-service tile to collect END USER INPUT to be used in a PRE-PROCESS Javelin Flow.

NOTE:  This KB provides one possible workaround for this limitation.

Environment

TDM 4.8.X 4.9.X 4.10.x

Test Data Manager
Agile Requirements designed (ARD) 3.X
Javelin 3.X

Resolution

Step One:

  • Create your process for the TDM Portal. In this use case, I created C:\Testcase3\UseCase3.bat
    • ( this batch file takes in 4 command-line arguments to be used in its process)
  • Test your process and make sure it works running as administrator /root or as the user running the TDM Portal.


Step Two:

  • Create a Javelin flow that executes the process application created above.
  • Make sure you create variables in Javelin for the Parameters you want to pass.

Step Three:

  • Create a Comma Separated File (CSV) with the variable names for the first line and dummy data for the second line
    • (The attached zip file has an example csv file called javelin_Variables_UseCase3.csv)
  • Next register the DELIM(CSV) file under Modeling\Objects

Step Four:

  • Create a batch file to process your variables into a Javelin CSV Variable file format
    • I created a file called publishvariables.bat that is contained in the attached zip file to process the 4 variables in this use case.
    • this batch file creates a publishvariables.csv file that will be used with the Javelin process.

Step Five:

  • Creat and XML file to be used with the JavelinExecutor.exe

Step Six:

  • Create a batch file to execute your Javelin Flow.
    • in this case, the batch file to do this is called RunJavelinExecutor.bat, and is included in the zip file

Step Six:

  • Create a new generator
  • Select the CSV Object created and registered in step 3
  • Create Variables with the same names as the field names and provide default values:
  • Make sure they are checked to resolve BEFORE publish

 

  • Make sure the generator is checked for use in self-service:
  • Create a new record in the generator and set the fields using data painter to the variable names that match

Step Six:

  • Create a PRE Publish Action
    • Make sure the Action Type is set to  HOST
    • in the command line put the path to your publish path along with the variables.
    • under execution make sure the following are checked
      • Wait for completion
      • Success Required
    • Under the execution plan make sure it is set to PRE
    • Set the timeout to 60 seconds or as needed for your process.

  • Execute the action to make sure the publishvariables.csv is created as expected

Step Seven:

  • Create a SECOND PRE Publish Action
    • Make sure the Action Type is set to  HOST
    • in the command line put the path to your publish path along with the variables.
    • under execution make sure the following are checked
      • Wait for completion
      • Success Required
    • Under the execution plan make sure it is set to PRE
    • Set the timeout to 60 seconds or as needed for your process.

  • Execute the action to make sure the Javelin flow processed  is created as expected


Step Eight:

  • Create an Agile Requirements Designer (ARD) model with a single process block in it.
  • In the make system data section connect to your TDM Portal 
    • Find the correct project and version for your generator
    • select the generator created in Step Five
    • Select the variables you want to pass to Javelin 
    • Set the Publish type to Use Default Publish
    • Save the flow to the TDM Repository in the same project and version.


Step Nine:

  • In the TDM Portal under Self Service Flows edit the new Flow and check the box for show in Self Service Catalog.
    • You should now have a new tile in the Self Service Catalog for your Process.

 

Additional Information

Notes:

  • make sure the directory for the Application you are having javelin run is local to the TDM Portal.
  • Make sure the permissions on the directory are set to allow everyone full permission or the user running the TDM Portal has full permissions.
  • If you need to do a publish to a database then create a temp table in the publish target with the field names of the variables you need to use in pre-process and register this table in step three and replace the CSV Object with your database object in the generator
  • Make sure your application.properties is set to allow HOST actions.

 

Attachments

1649884356797__Testcase3.zip get_app