Prevent file import when the workflow step is certified without using a lock

Amin
New Contributor

Hello community, 

We are trying to prevent the end users from uploading a data file on an import workflow step that is certified.

To do so we have started using the the TransformationEventHandler in the Extensibility Rules. We are able to get into the right code:

Select Case args.OperationName
Case Is = BREventOperationType.Transformation.ParseAndTrans.StartParseAndTransform

From here, we have access to the workflow step arguments TransformationEventHandlerArgs (for example the file that has been uploaded etc).

We know that we can get access to the certification status from DataQualityEventHandler business rule using:

Dim CertifySignOffInstance As CertifySignOffInstanceInfo = DirectCast(args.Inputs(2), CertifySignOffInstanceInfo)

and 

Dim signOffState As Integer = certifySignOffInstance.SignOffState

where signOffState = 110 or signOffState = 130 means that the workflow is certified. Which is great.

 

The question here is how can we get access to the CertifySignOffInstance from TransformationEventHandler ?

If you have done this before, or have an idea, please feel let us know 🙂

6 REPLIES 6

PatrickWWiggett
New Contributor II

Hi,

I don't know how to answer this question, but I was just curious about it.

Why does the environment not lock the workflow period after certification? That way you can't edit any of the individual workflow steps after certifying. I am just curious to try and understand why this specific requirement?

Kind Regards

Hi,

We have multiple import steps in the same month. If we lock one the others will also be locked. The client prefers to not wait for all data to be uploaded to start working on the reporting. Once an import step is certified, he can start producing the reports (as long as the user doesn't reupload new data - which we are trying to prevent)

Why don't you use channels for this? That way individual workflows can be locked.

This solution seems to be the best option indeed. We didn't know if the entities assigned to the workflow would be locked if the step is locked. Thank you !

TonyToniTone
Contributor II

If I understand this correctly, it sounds like using the standard functionality of Workflow Channels may be an option here vs. creating a BR.  Have you looked into using Workflow Channels to granularly lock individual Import steps at different times of the Workflow process?  

The workflow channel seems to be the best option indeed. We didn't know if the entities assigned to the workflow would be locked if the step is locked. Thank you !