Skip to main content
Question

How to run FME workspace asyn from C#


Forum|alt.badge.img

Hi there,

I can create a C# application syn way although my C# Controller using asyn way follows the sample in FME Playground. So how to create with asyn way using C#? So I can get the fme job# id. By the way, how can I run a workspace using asyn way by login FME Server? Thank you very much.

5 replies

david_r
Celebrity
  • November 3, 2017

There is a pretty good starting point on the FME Server Playground: https://playground.fmeserver.com/csharp-request/


Forum|alt.badge.img
  • Author
  • November 3, 2017

This is an syn example and only example for C#. This is working for me, but sometimes workspace may run a long time, my C# want to do "fire and forgot", but meanwhile get the FME job id right away for late continues accept messages from a SignalR.


david_r
Celebrity
  • November 3, 2017

I have a slight problem understanding exactly what you need, but the example I linked to on the FME Server Playground is indeed asynchronous, not synchronous.

The code example submits a job to FME Server and prints the job id that it receives at the end of the code example. You can then use this job id to poll for progress, etc. while the job is executed. If you do this in a loop you can also take care of other stuff in your application.


Forum|alt.badge.img
  • Author
  • November 3, 2017
david_r wrote:

I have a slight problem understanding exactly what you need, but the example I linked to on the FME Server Playground is indeed asynchronous, not synchronous.

The code example submits a job to FME Server and prints the job id that it receives at the end of the code example. You can then use this job id to poll for progress, etc. while the job is executed. If you do this in a loop you can also take care of other stuff in your application.

I see, my json string is not correct, has to be name value pair.

 

 


david_r
Celebrity
  • November 3, 2017
allensong wrote:
I see, my json string is not correct, has to be name value pair.

 

 

I really recommend looking at the examples on the FME Server Playground, there is a lot of great resources available there.

 

The most important part, however, is the REST API documentation:

 

V2: https://docs.safe.com/fme/html/FME_REST/v2/apidoc/index.html

 

V3: https://docs.safe.com/fme/html/FME_REST/apidoc/v3/index.html

 

If you're only using FME Server 2017 or later I recommend using the V3.

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