Forum Discussion
- OSAdminValued ContributorOriginally posted by Frank Dossing
hi Ashok,
you can trigger a workflow load by using the BRApi method as below:
If BRApi.Import.Process.ExecuteParseAndTransform(si, wfUnitClusterPk,Nothing,Nothing,TransformLoadMethodTypes.Replace,sourceDataOriginTypes.FromDirectConnection,False).Status = WorkflowStatusTypes.Completed Then
There are methods for import, validate and load.
So setup a function that triggers a specific workflow, then you can call that function from a DM.
- OSAdminValued ContributorOriginally posted by Krishna Srinivasan
Thanks. I am new to OS and could you please explain what is wfUnitClusterPk ? how to pass the values. If you have an example that would be great.
Krishna
- OSAdminValued ContributorOriginally posted by Krishna Srinivasan
Thanks. I am new to OS and could you please explain what is wfUnitClusterPk ? how to pass the values. If you have an example that would be great.
Krishna
- OSAdminValued ContributorOriginally posted by Krishna Srinivasan
I am new to OS and I was able to find how to call the Execute & Transform using si.WorkflowClusterPk this will work. To start with you can use this code but I am working on dynamically selecting the values. The below code will give you an idea.
Dim SourceDataOrginTypes As String = sourceDataOriginTypes.FromDirectConnection
Dim TransformLoadMethodTypes1 = TransformLoadMethodTypes.ReplaceAllTime
Dim objLoadTransformProcessInfo As LoadTransformProcessInfo = BRApi.Import.Process.ExecuteParseAndTransform(si,si.WorkflowClusterPk,Nothing,Nothing,TransformLoadMethodTypes1,SourceDataOrginTypes,False)
Krishna
- kbonNew Contributor
Hello,
am trying to use this code above for my dev (same objective : automate the import workflow ) but doesn't work for me ... it seems like the system doesn't recognize the wfclusterpk and doesn't launch the import process and finish by failing )Dim wfClusterPk As WorkflowUnitClusterPk = api.SI.WorkflowClusterPk
Dim SourceDataOrginTypes1 As String = sourceDataOriginTypes.FromDirectConnectionDim TransformLoadMethodTypes1 = TransformLoadMethodTypes.ReplaceAllTime
Dim objTaskActivityItem As TaskActivityItem = BRApi.Utilities.ExecuteDataMgmtSequence(si, "Test_Import", Nothing)
Dim objLoadTransformProcessInfo As LoadTransformProcessInfo = BRApi.Import.Process.ExecuteParseAndTransform(si, WfClusterPk,Nothing,Nothing,TransformLoadMethodTypes.Replace,SourceDataOrginTypes1,False)
If objLoadTransformProcessInfo.Status = WorkflowStatusTypes.Completed Then
Return objTaskActivityItem
End If
can you please check the code above and help ? thank youalso should we add it on the extender BR or finance module ?
Related Content
- 4 months ago