Skip to main content
Question

How to run 2 x WorkspaceRunners simultaneously with "Wait for Job to Complete" = Yes

  • November 20, 2020
  • 7 replies
  • 126 views

bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist

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

7 replies

davtorgh
Contributor
Forum|alt.badge.img+10
  • Contributor
  • November 20, 2020

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!


ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • November 20, 2020

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

 


bwn
Evangelist
Forum|alt.badge.img+26
  • Author
  • Evangelist
  • November 20, 2020
davtorgh wrote:

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! 😉


bwn
Evangelist
Forum|alt.badge.img+26
  • Author
  • Evangelist
  • November 20, 2020
ebygomm wrote:

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.


ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • November 20, 2020
bwn wrote:

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


davtorgh
Contributor
Forum|alt.badge.img+10
  • Contributor
  • November 20, 2020
bwn wrote:

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.


sandrawang
Participant
Forum|alt.badge.img+2
  • Participant
  • April 7, 2025

Hi Copilot

i used fme temppathcreator to create a temporary folder and connect to data lake to get files downloaded to the temp folder, then use featurereader to read these parquet file, however , feature reader can’t identify some files with out .parquet extension

how could I filter our these non-.proaquet format data and in whcih steps to do thsi ?

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings