01-09-2020 10:56 AM
We are loading data using SQL connector business rule and it works fine manually. looking for a way to load it automatically using a extender business rule and then calling from DM step. has any one done this? can you share sample code if possible?
01-12-2020 10:36 PM
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.
06-02-2020 07:41 PM
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
06-02-2020 07:42 PM
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
06-04-2020 11:44 AM
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
03-16-2022 05:21 PM - edited 03-16-2022 05:22 PM
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.FromDirectConnection
Dim 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 you
also should we add it on the extender BR or finance module ?