How to complete an optional import/validate/load workflow channel via the api
I have an IsOptional=True direct connect Import/Validate/Load Workflow channel. I would like to be able to Complete this Workflow channel via the OS api without having to import/validate/load anything, the same as if someone selected the 'Complete Workflow' button just to the right of the 'Clear' button in OnePlace. Actually, I have a number of such workflows, some are only required for M12 and others are placeholders for data that is being copied directly into the cube from other non-linked cubes.
I can complete/revert the Workflow channel if it is set to Workspace using BRApi.Workflow.Status.SetWorkflowStatus(). And I can revert Import/Validate/Load workflows with the SetWorkflowStatus() too, but I do not appear to be able to complete the WF unless I'm at the last step or advance the steps with SetWorkflowStatus().
The BRApi.Import.Process.* functions will advance me through the Import/Validate/Load steps, but I cannot see how to do so without the functions importing data.
I want to complete this optional workflow via the OS api without the workflow doing anything.
Any thoughts?
Thanks
rhankey - I could not able to find the BRAPI for complete WF but you can use the below to complete the WF. It will complete all the step and you can see the green check. BTW if you were able to find the API do let me know.
Note: It is working even if the optional load is set to False. So make sure you test in the Test environment before running in Production.
BRApi.Workflow.Status.SetWorkflowStatus(si, si.WorkflowClusterPk, StepClassificationTypes.DataLoadTransform, WorkflowStatusTypes.Completed, "Auto completing Import", "Error autocompleting ", "Auto completing", Nothing) BRApi.Workflow.Status.SetWorkflowStatus(si, si.WorkflowClusterPk, StepClassificationTypes.ValidateTransform, WorkflowStatusTypes.Completed, "Auto completing Validate", "Error autocompleting ", "Auto completing", Nothing) BRApi.Workflow.Status.SetWorkflowStatus(si, si.WorkflowClusterPk, StepClassificationTypes.ValidateIntersection, WorkflowStatusTypes.Completed, "Auto completing Int", "Error autocompleting ", "Auto completing", Nothing) BRApi.Workflow.Status.SetWorkflowStatus(si, si.WorkflowClusterPk, StepClassificationTypes.LoadCube, WorkflowStatusTypes.Completed, "Auto completing Workspace", "Error autocompleting Load", "Auto completing", Nothing)