Skip to main content

I'm struggling to figure out a way for an initiating Feature to trigger 2 separate WorkspaceRunners simultaneously.

 

In this case, Workspace 1 and Workspace 2 are completely independent of each other, and it doesn't matter to them if the other Workspace Fails or Succeeds.

 

However, Workspace 3 DOES need to conditionally only run if Workspace 1 and Workspace 2 both succeed, and Workspace 1 and 2 must only report "Success" if they run with no errors.

 

I hopefully set it up this way below only half expecting success, although it ended up that this still only ran the WorkspaceRunners in Sequence and didn't work, since WorkspaceRunner #2 waited until WorkspaceRunner #1 completed before pulling in the Initiator Feature.

 

Note: Workspace 1 and 2 are completely different FMWs and completely different Parameter lists.

 

capture

HI @bwn​ 

 

if I understand correctly, you are not dealing with a performance issue, but you need to be sure that WorkspaceRunner3 runs if and only if both WorkspaceRunner1 and WorkspaceRunner2 succeded. I think the following method should work.

screenshot.1In short:

  • one feature comes out from the succeded WorkspaceRunner;
  • the AttributeCreators add an attribute to these features (_wks01_ok = 1 or _wks02_ok = 1);
  • the important thing is that a feature comes out from the FeatureJoiner joined port if and only if both input features have the attributes set to 1 (FeatureJoiner is a blocking transformer); if there is no join WorkspaceRunner3 does not run.

 

Hope that helps!


I'm not sure there is a way to get the Workspaces running in parallel if Wait for Job to Complete = Yes

 

An alternative might be to allow concurrent processes and then have another method for checking whether the workspace is complete before triggering the final workspace

 


HI @bwn​ 

 

if I understand correctly, you are not dealing with a performance issue, but you need to be sure that WorkspaceRunner3 runs if and only if both WorkspaceRunner1 and WorkspaceRunner2 succeded. I think the following method should work.

screenshot.1In short:

  • one feature comes out from the succeded WorkspaceRunner;
  • the AttributeCreators add an attribute to these features (_wks01_ok = 1 or _wks02_ok = 1);
  • the important thing is that a feature comes out from the FeatureJoiner joined port if and only if both input features have the attributes set to 1 (FeatureJoiner is a blocking transformer); if there is no join WorkspaceRunner3 does not run.

 

Hope that helps!

No, it is a performance optimization issue.

Amazingly, the way you set the AttributeCreator and FeatureJoiner is exactly how I have it set and exactly how I am using them to create an "AND" logic check. I used a different Attribute Name in the AttributeCreators but that is the only difference! 😉


I'm not sure there is a way to get the Workspaces running in parallel if Wait for Job to Complete = Yes

 

An alternative might be to allow concurrent processes and then have another method for checking whether the workspace is complete before triggering the final workspace

 

Yep, that is the only way I could think of too @ebygomm​ . Set Wait for Job to Complete to "No", and have to use some other Logic Test that Workspace 1 and Workspace 2 ran without Error, possibly by checking their Writer output metadata, but that is a bit clunky.


Yep, that is the only way I could think of too @ebygomm​ . Set Wait for Job to Complete to "No", and have to use some other Logic Test that Workspace 1 and Workspace 2 ran without Error, possibly by checking their Writer output metadata, but that is a bit clunky.

I've not often relied on Set Wait for Job to Complete as it is sometimes misleading (e.g. still writing to an Oracle table) so often had to resort to clunky


Yep, that is the only way I could think of too @ebygomm​ . Set Wait for Job to Complete to "No", and have to use some other Logic Test that Workspace 1 and Workspace 2 ran without Error, possibly by checking their Writer output metadata, but that is a bit clunky.

If you plan to publish your workspaces to an FME Server with more than one engine, you could assign different queues to different workspaces and have them be executed by different engines, obtaining in this way the execution in parallel.


Reply