has anyone done data import/validate/load automation using the connector business rule?

OSAdmin
Valued Contributor
Originally posted by Ashok Amresh

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?

5 REPLIES 5

OSAdmin
Valued Contributor
Originally 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.

OSAdmin
Valued Contributor
Originally 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

OSAdmin
Valued Contributor
Originally 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

OSAdmin
Valued Contributor
Originally 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

 

 

kbon
New 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.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 ?