Hi Mahesh,
Depending on use case, If you want to pass variable to Javelin flow which is defined as action, you can use variables that you defined in your generator.
I suggest you to have a look on sample "requestBody". It may be helpful for your case. See section in
bold below.
{
"actionOnDuplicate": "string",
"actionOnError": "string",
"actionOnGenDuplicate": "string",
"authId": 0,
"basedOnJobId": 0,
"basedOnPortalJob": true,
"batchCommit": true,
"blobId": 0,
"clobData": "string",
"comments": "string",
"connectSrc": true,
"connectTarget": true,
"createdBy": "string",
"currentDay": "string",
"currentMonth": "string",
"currentYear": "string",
"dataSourceProfile": "string",
"dataTargetProfile": "string",
"dependsOn": 0,
"email": "string",
"emptyTargetGenerator": true,
"exportPublishedTable": true,
"exportUrl": "string",
"fileDBMS": "string",
"fileId": 0,
"format": "string",
"generatorId": 0,
"inFile": "string",
"inFileData": "string",
"iterationsBeforeCommit": 0,
"jobId": 0,
"jobParams": [
{
"paramKey": "string",
"paramValue": "string"
}
],
"jobType": "string",
"maxLOVItems": 0,
"multipleFDFiles": true,
"oneFile": "string",
"outDir": "string",
"outFile": "string",
"password": "string",
"phone": "string",
"projectId": 0,
"projectVersionId": 0,
"publishTo": "string",
"rep": "string",
"repeatCount": "string",
"runningStatus": "string",
"scheduledStart": "2021-04-20T08:36:29.241Z",
"schema": "string",
"sessionId": "string",
"status": "string",
"storeXref": true,
"subsetGeneratorId": 0,
"subsetSeq": 0,
"tables": [
{
"actionOnDuplicate": "string",
"excluded": true,
"fileId": 0,
"locationProfile": "string",
"locationSchema": "string",
"locationTable": "string",
"status": 0,
"tableName": "string",
"tableNo": 0,
"tableRepeatCount": "string"
}
],
"target": "string",
"testMode": true,
"threadName": "string",
"title": "string",
"toGeneratorId": 0,
"toGeneratorType": "string",
"transformationMap": "string",
"userName": "string",
"varGeneratorId": 0,
"varSql": "string",
"varSqlConnection": "string",
"variableDefaults": [{"name": "string","preResolveError": "string","preResolveValue": "string","value": "string"}],"variableDefaultsStr": "string","variableSource": "string","variableSourceArgument": "string","variableSourceConnection": "string"}
Best Regards,
Original Message:
Sent: 04-21-2021 06:17 AM
From: Mahesh
Subject: Javelin workflow execution from TDM API's
Hi Cihan,
I have used the above API to publish data. I understand that I can use repeatCount to manage the iteration, but other than that the options available are basically on the default configurations and managing the output type. Is there a way with which I can expose variables defined in the workflow(eg: environment (TEST/INT), a flag value (Y/N) , or an input text etc), so that the flow can consider the inputs provided by users and execute the workflow accordingly
Original Message:
Sent: 04-20-2021 04:06 AM
From: Cihan Ankara
Subject: Javelin workflow execution from TDM API's
Hi Mahesh,
As far as I could understand from your case, I can say that it is possible.
You can use /api/ca/v1/jobs method to do that. There are multiple variables that you can set values while submitting the publish job. e.g. dataSourceProfile, dataTargetProfile, repeatCount etc.
You can also provide projectId, generatorId to application users. So, they can use those information to fullfill the request.
Here you can find detailed information on usage.
http://<TDM_Url>:<port>/TDMPublisherService/swagger-ui.html#!/publish45controller/submitPublishJobUsingPOST
Hope this helps.
Best Regards,
Original Message:
Sent: 04-19-2021 06:54 AM
From: Mahesh
Subject: Javelin workflow execution from TDM API's
Thanks for the suggestion. Can we have the customization done on this to be able to get the values at runtime.
Eg: the generator/workflow is configured to receive 2 parameters at runtime (say environment and iterator). Inputs to the publish service are jobId, projectID and authorization token. If we have to expose these API's to application users, they will only have the information about the environment and records count as per their scenario, and not on the jobId, ProjectID or auth token. So in this case, can we have the customization done in order to seek only the required values and be able to manage the others ourselves?
Original Message:
Sent: 04-19-2021 05:59 AM
From: Cihan Ankara
Subject: Javelin workflow execution from TDM API's
Hi Mahesh,
If you have already assigned a Javelin workflow as an action to a generator, you can run it by submitting a publish job through TDMPublisherService.
Best Regards,
Cihan
Original Message:
Sent: 04-19-2021 05:08 AM
From: Mahesh
Subject: Javelin workflow execution from TDM API's
Hi All,
Please can you advise if we can execute Javelin workflows from TDM Services (specifically TDMOrchestrationService or any other services)
regards,
Mahesh