Execute Import > Validate > Process using a button on a dashboard

MarkBird
Contributor II

Hi 

I have a dashboard that executes an Import > Validate > Process using a business rule.

In my workflow I am currently using Workspace, Import, Validate, Process, Confirm:

MarkBird_0-1683636656682.png

I would like to just use Workspace, Confirm, but it gives me the following error: "Cannot execute step because the specified step classification doesn't exist for the workflow profile."

 

Is there anyway around this?

 

Thanks,

Mark

1 ACCEPTED SOLUTION

I see, so that is not possible on a single Workflow. You could have 2 Workflows though:

Workflow 1 = Workspace

Workflow 2 = Import, Validate, Process, Confirm

These could be on the same Base Input Profile and control the access through the Access Group.

View solution in original post

14 REPLIES 14

How are you calling the confirm execution?

I'm not automating that part - may even drop the confirm step at this stage.

To clarify - are you saying that you want to drop Import, Validate, Process from the steps going across the top of the Workflow? If so, this will likely need an enhancement in order to add that Workflow Name (Workspace, Confirm) to the Import.

Yeah, that is what I'm asking. to be fair, I'm not precious about confirm. I would be happy with just Workspace.

Ok, if it's just Workspace then you should be able to change the Workflow Name on that Import. Just be aware that this changes the Workflow Name for all periods so anything done in other steps in previous periods wouldn't be visible after this change (but will still be in the tables).

EricOsmanski_0-1683643896795.png

 

When I do that, I get the following error when my business rule runs:

"Cannot execute step because the specified step classification doesn't exist for the workflow profile."

We probably will need to see the rule detail in order to be able to diagnose the issue. Can you share that?

Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As ExtenderArgs) As Object
	Try
		Select Case args.FunctionType

			Case Is = ExtenderFunctionType.ExecuteDataMgmtBusinessRuleStep

				'Prepare Parameters
				Dim profileKey As Guid = New Guid(args.NameValuePairs.XFGetValue("ProfileKey"))
				Dim scenarioId As Integer = ConvertHelper.ToInt32(args.NameValuePairs.XFGetValue("ScenarioId"))
				Dim timeId As Integer = ConvertHelper.ToInt32(args.NameValuePairs.XFGetValue("TimeId"))
				Dim wfClusterPK As New WorkflowUnitClusterPk(profileKey, scenarioId, timeId)

				'Execute extraction
				Dim piLoadTransform As LoadTransformProcessInfo = BRApi.Import.Process.ExecuteParseAndTransform(si, wfClusterPK, Nothing, Nothing, TransformLoadMethodTypes.Replace, SourceDataOriginTypes.FromDirectConnection, False)

				'Execute validations
				Dim piValidateTransformation As ValidationTransformationProcessInfo = BRApi.Import.Process.ValidateTransformation(si, wfClusterPK, True)
				Dim piValidateIntersections As ValidateIntersectionProcessInfo = BRApi.Import.Process.ValidateIntersections(si, wfClusterPK, True)

				'Execute Load & Process
				Dim piLoadCube As LoadCubeProcessInfo = BRApi.Import.Process.LoadCube(si, wfClusterPK)
				Dim piProcessCube As ProcessCubeProcessInfo = BRApi.DataQuality.Process.ExecuteProcessCube(si, wfClusterPK, StepClassificationTypes.ProcessCube, False)

		End Select

		Return Nothing
	Catch ex As Exception
		Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
	End Try

End Function

Ok, looks like you are trying to automate the Import, Validate and Process. I also thought that you wanted only the Workspace step so we removed those steps.

Can you clarify what steps you want (Workspace, Import, Validate, Process, Confirm) and then which of those you want to automate?

I have a dashboard (which is on the Workspace step), on the dashboard I'm loading data into the Cube using a business rule. So I am automating the Import, Validate, and Process steps.

 

However, from a user perspective, I don't want them to see Import > Validate > Process. So I'm looking to see if it is possible to hide these from the user, I only really want them to interact with the dashboard.

 

I see, so that is not possible on a single Workflow. You could have 2 Workflows though:

Workflow 1 = Workspace

Workflow 2 = Import, Validate, Process, Confirm

These could be on the same Base Input Profile and control the access through the Access Group.

Ah ok, that's an interesting option! I'll give that a go.

Why not make one workflow which is Import, Validate, Process. However, whichever option you go with the user needs access to that workflow so that they can run it. Then create a dashboard with a button and run that rule you got. I would also add a step to get the workflow info and see if the step you can going to execute is valid for that workflow and then rule the code. If you search for validate interactions here, you'll get an example I posted a while back. 

Thanks!