Comments and answers for "Define success\failure topics when publishing workspace with FMEServer REST API" https://knowledge.亚搏在线safe.com/questions/33872/define-sucessfailure-topics-when-publishing-worksp.html The latest comments and answers for the question "Define success\failure topics when publishing workspace with FMEServer REST API" Comment by thibaut_gheysen on thibaut_gheysen's answer https://knowledge.safe.com/comments/34370/view.html Thanks you very much.It works.
Thu, 22 Sep 2016 08:05:59 GMT thibaut_gheysen
Answer by larry https://knowledge.safe.com/answers/34326/view.html

If you are in a hurry, maybe you can use this solution.

If the original REST API is still available, you can look at a workspace properties using this url sample:

http://fmeserver/fmerest/repositories/ / /properties?token=

You will have to previously use the v2 API to register your workspace to the jobsubmitter service:

See: http://fmeserver/fmerest/repositories/< repository >/items/< item >/services

You will then be able to set properties using this v1 REST call (POST):

http://fmeserver/fmerest/repositories/ / /properties.json?token= &category=fmejobsubmitter_FMEUSERPROPDATA&name=SUCCESS_TOPICS&value=

Note that for the topic to be triggered, you have to launch the workspace using a direct service call instead of a REST one.Seethis linkfor details.

Wed, 21 Sep 2016 14:57:12 GMT larry
Comment by thibaut_gheysen on thibaut_gheysen's answer https://knowledge.safe.com/comments/34336/view.html

@Mark2AtSafeThanks for the answer.

Following a discussion with the support team, I created the corresponding idea :

https://knowledge.safe.com/content/idea/34302/rest-api-specify-successfailure-topics-when-publis.html

Wed, 21 Sep 2016 07:55:15 GMT thibaut_gheysen
Answer by mark2atsafe https://knowledge.safe.com/answers/34148/view.html

Hi@thibaut_gheysen

As I see it there are success/failure topics for both:

DATADOWNLOAD_ASYNC_JOB_FAILURE

DATADOWNLOAD_ASYNC_JOB_SUCCESS

JOBSUBMITTER_ASYNC_JOB_FAILURE

JOBSUBMITTER_ASYNC_JOB_SUCCESS

However, I don't see a way of setting these to a workspace using the API.

I think the best thing to do now is to contact our support team (safe.com/support) and ask about it.Tell them I think it is related to PR#55214.If you can explain why you need to do this, then the FME Server product manager can take a look and see if that ability is one we can add easily - or if there is another solution on the horizon.

Regards

Mark

Fri, 16 Sep 2016 14:55:53 GMT mark2atsafe
Comment by david_r on david_r's answer https://knowledge.safe.com/comments/34141/view.html Ah yes, of course, it will also work for the services you can specify when publishing from Desktop, I forgot about that (since I hardly ever use them).

Regarding what Safe has planned, I have no idea.If none of the Safers chimes in here, you could always contact support and ask.You could also post it as an idea here and try to gather support.
Fri, 16 Sep 2016 14:05:19 GMT david_r
Answer by thibaut_gheysen https://knowledge.safe.com/answers/34135/view.html

@david_rThank for the answer.Are you sure that these success/failure topics are only valid for the jobsubmitter service?I just published a workspace from FME Desktop to datadownload service and I specified a success topic.When I execute the workspace using the datadownload service from the FME Server Web Interface, the selected topic is well trigger.Perhaps I miss something.

Is there any plan to have the possibility to define default NMDirectives when registering a service to a workplace using the REST API ( /repositories/< repository >/items/< item >/services) ?Could be useful when, for example, a team is responsible of the development of the workspace and their publication to FME Server while a lot of different clients can consume those services and some of them will perhaps forgot to specify the NMDirectives (even if specified in the documentation).In such situation, the development team will not receive notification in case of failure.

Fri, 16 Sep 2016 13:21:53 GMT thibaut_gheysen
Answer by david_r https://knowledge.safe.com/answers/33873/view.html

Looking at the v2 REST API documentation, it doesn't seem possible.

It is true, that when publishing a workspace from FME Desktop you can define the success/failure topics, but those topics are only valid for thejobsubmitterservice.

This means that if you use any other service to execute a translation, e.g.thetransformationsservice in the REST API, then you will have to specify the NMDirectives anyway.

Tue, 13 Sep 2016 13:12:28 GMT david_r