Skip to main content
Question

How to create an outbound sync application message from Workflow (BPA) in Cloud?


Forum|alt.badge.img+8

I tried to find a REST API for application message handling but that existing ones could not create a message.

(22R2)

Do you know a way to do this?

Forum|alt.badge.img+8
  • Hero (Employee)
  • March 14, 2023

Hi.

From a workflow you can use the IFS REST call custom delegate.
More info here:

https://docs.ifs.com/techdocs/23r1/040_tailoring/500_business_process_automation/050_business_process_modeling/030_ifs_rest_call/

 

This delegate will invoke the HTTP request and provide the response along with the HTTP response code. Then you can parse the response body (XML/JSON using JSONPath) and extract the HTTP response code to proceed with additional logic.

Thank you much.
Best regards.
Gonzalo.

 


Forum|alt.badge.img+8
  • Sidekick (Partner)
  • March 14, 2023

Hi Gonzalo,

 

Thanks for info on calling REST, that is useful, but my point was the creation of an Application Message.

Which would go to IFS Connect, get routed to an address and so on.

REST would definitely be one way to do that, but I cannot find the API for that purpose.

Do you have some idea on that?


Forum|alt.badge.img+8
  • Hero (Employee)
  • March 14, 2023

Hi jasahu.

OK, now I understand you want to create an Application Message from a workflow. Then you will have to use a IFS Projection Delegate and use the projection/action that deals with Application Messages.

Is that what you mean?


Have you checked this projection?
main/ifsapplications/projection/v1/ApplicationMessagesHandling.svc

Best regards.
Gonzalo.
 


Forum|alt.badge.img+8
  • Sidekick (Partner)
  • March 14, 2023

Yes, Projection Delegate could work too, provided I have the proper projection.

ApplicationMessagesHandling.svc or ApplicationMessageHandling.svc do not seem to help me, no possibility to create new msg.

Interestingly,  ApplicationMessagesLobbyHandling.svc seems capable of creating app messages, in 3 steps, via action ImportMessage.

But is that the best option out there?

App message are far more important than getting such a bad treatment.

 

 


Forum|alt.badge.img+8
  • Hero (Employee)
  • March 15, 2023

Hi.

May I know why you want to create an Application Message from a workflow? What would be the use case?

Thank you much.
Best regards.
Gonzalo.

 


Forum|alt.badge.img+8
  • Sidekick (Partner)
  • March 16, 2023

We have an integration task, and have to communicate with the other app by way of files so I need to create an outbound  app message which will become a file sent by FILE_SENDER.

 

And I am also interested in outbound SYNC app messages as well, to see how much we can accomplish in the future.


Forum|alt.badge.img+8
  • Hero (Employee)
  • March 16, 2023

Hi jasahu.

I’m not able to locate a Projection that can create Application Messages. What if you force the creation of the Application Message from the workflow by triggering Custom Event. So you use a Projection delegate to create/update a record. Then that triggers the Custom Event and that Event has a Event Action of type Application Message. Then you will get your message created. Would that be valid?

Regarding the “I am also interested in outbound SYNC app messages as well” comment… Application Messages can be routed to HTTP Senders. These senders will get the response stored and you can configure IFS to process that response using a Routing Rule + Routing Address. But bear in mind that when you create an Application Message, it will be handled by a queue in ASYNC manner.

Best regards.
Gonzalo.


 


Forum|alt.badge.img+8
  • Sidekick (Partner)
  • March 20, 2023

Hi Gonzalo,

 

Regarding App Msg creation via Custom Event:

That could work, but this is more complicated than what I wrote above using ‘ImportMessage’, but good to know as an alternative.

 

Regarding outbound SYNC:

It is not about he connector being sync or async, it is about the message itself being sync.

That means that the message does not get into any queue (like OUT1), but it gets executed immediately.

Action of type ‘Application Message’ of a Custom Event cannot do that that is always async.

Plsqlap_Server_API.Invoke_Outbound_Message would do that in SYNC for me, if there was a way to call that from Workflow.

 

BR

Janos


Forum|alt.badge.img+3
  • Do Gooder (Partner)
  • February 4, 2025

Hi did you succeed to create an outbound sync application message from Workflow ?


Forum|alt.badge.img+8
  • Sidekick (Partner)
  • February 4, 2025
K4uFredeL wrote:

Hi did you succeed to create an outbound sync application message from Workflow ?

Hi, 

No, unfotunately I did not


Forum|alt.badge.img+12

If you have access to Studio Developer, it should be fairly trivial to create a Custom Projection Action, then to define the PLSVC file for that action to call PLSQLAP_SERVER_API.Invoke_Outbound_Message, if that’s the API you want to call.

 

Then if that Projection (in which you’ve created the custom Action) is one that’s Enabled in API Explorer, you should be able to call the action from a Workflow if that’s what you’re trying to do.

 

I did check (24R2) and indeed I can’t see any out of the box Projection SVC Package that currently contains a call to that API method, so you’d have to create one.


Forum|alt.badge.img+3
  • Do Gooder (Partner)
  • February 4, 2025

Hi,  
Thank you,

I was expecting that solution.  
As there is a clob parameter  in Invoke_Outbound_Message procedure,  there might be a problem with a workflow that is calling a Custom Projection Action with that parameter.

 

regards


Forum|alt.badge.img+12

You might need to make the action use a different type as an input then convert the input to CLOB within the PLSVC logic itself.

 

Note that typically, if an action/function has a parameter defined with type LongText, this automatically converts the input to CLOB and is available as CLOB to use within the PLSVC Package.


Forum|alt.badge.img+3
  • Do Gooder (Partner)
  • February 5, 2025

 
Thank you

I created a new API “CFndStreamExtensionService”   with a action: “PostOutboundMessage”

 

The test with PostMan is OK But i cannot call it from a Worfflow:
 
It is possible to select the API Name “CFndStreamExtensionService” but it is impossible to select the Call Name “PostOutboundMessage”
An Idea ?
 

 


Forum|alt.badge.img+12

Can you show us the Studio Developper side of it ? Specifically how you defined the Action and associated PLSVC Logic ?

 

(Also another test you can do is to define your action as a custom action through an override of an existing projection in which you can actually see the action calls, this might help make it appear in that other projection, maybe).

 

You might also want to make sure you refreshed all caches and log out/back in the application just in case.

 

 


Forum|alt.badge.img+3
  • Do Gooder (Partner)
  • February 5, 2025



projection CFndStreamExtensionService;
component NTFYME;
layer Cust;
description "Put some useful description here ...";
category Integration;

--------------------------------- FRAGMENTS ---------------------------------

----------------------------- MAIN ENTRY POINTS -----------------------------
entityset FndStreamExtensionSet for FndStreamExtension;

------------------------------ ENTITY DETAILS -------------------------------


------------------------------- ENUMERATIONS --------------------------------


---------------------------------- QUERIES ----------------------------------


---------------------------------- ACTIONS ----------------------------------
action PostOutboundMessage {
   initialcheck implementation;
   parameter File Text;
   parameter Sender Text;
   parameter Receiver Text;
   parameter MessageType Text;
   parameter MessageFunction Text;
}
=======================================================================

-------------------- LU SPECIFIC PUBLIC METHODS -----------------------------

PROCEDURE Post_Outbound_MessageTest (
   file_ IN VARCHAR2,
   sender_ IN VARCHAR2,
   receiver_ IN VARCHAR2,
   message_type_ IN VARCHAR2,
   message_function_ IN VARCHAR2)
IS
   clob_ CLOB; 
BEGIN
    clob_ := TO_CLOB(file_);
    Plsqlap_Server_API.Post_Outbound_Message(           
                                                 clob_,
                                                 sender_       => sender_,
                                                 receiver_     => receiver_,
                                                 message_type_ => message_type_,                                            
                                                 message_function_ => message_function_);   
END Post_Outbound_Message;


Forum|alt.badge.img+3
  • Do Gooder (Partner)
  • February 5, 2025

I refreshed dictionary cach in IFS 


Forum|alt.badge.img+12

Not sure how you did that but your Procedure Name doesn’t match the Action.

 

The procedure name is typically converted, here there’s a weird “Test” that has been added at the end.

 

Doing it like this (I have overriden a random projection to do this):

 

Projection Action

 

 

PLSVC

 

Workflow Designer

 


Forum|alt.badge.img+3
  • Do Gooder (Partner)
  • February 5, 2025

Thank you , 

Sorry, here is the good code generated:

 

PROCEDURE Post_Outbound_Message___ (
   file_ IN VARCHAR2,
   sender_ IN VARCHAR2,
   receiver_ IN VARCHAR2,
   message_type_ IN VARCHAR2,
   message_function_ IN VARCHAR2)
IS
   clob_ CLOB; 
BEGIN
    clob_ := TO_CLOB(file_);
    Plsqlap_Server_API.Post_Outbound_Message(           
                                                 clob_,
                                                 sender_       => sender_,
                                                 receiver_     => receiver_,
                                                 message_type_ => message_type_,                                            
                                                 message_function_ => message_function_);   
END Post_Outbound_Message___;


Forum|alt.badge.img+12

Like I said, I’m not sure how it works exactly with custom projections, but have you tried just override an existing projection just to see if the Call then appears? It does for me, as long as you pick a Projection that it makes sense to override, I think that’d be ok?


Forum|alt.badge.img+3
  • Do Gooder (Partner)
  • February 5, 2025

Yes , I’m trying to do it :

I overrided an existing projection (CustomerHandling) with a call :


 

It looks to work better but i have now the problem when i deploy the workflow:
 

 


Forum|alt.badge.img+3
  • Do Gooder (Partner)
  • February 5, 2025

I started again IFS : the error message disappeard

 

The workflow is now working: 

when i have created a new customer, the workflow started and send a message to IFSConnect


Forum|alt.badge.img+12

Good to hear, although to be clear

 

This bit

 

Is unneeded if you define the projection action and related PLSVC logic through Studio Developer, the action becomes part of the projection you’re overriding, no need to do anything else.

To reiterate, what I’m suggesting is that you define the action and plsvc not in your custom projection of  CFndStreamExtensionService but directly in another, out of the box projection (such as in ApplicationMessageHandling).

​ That way you don’t need to define anything in the config layer :)

Still a bit unclear as to why your custom projection definition didn’t work though, especially if the action call was visible in the API doc (which it was as you demonstrated in a screenshot), I can’t think of any reason it wouldn’t be available as a call in a workflow.

 

Did you actually define both the action (the one without TEST at the end) AND the plsvc logic in the same files? (Unclear why you’re calling the method from fnd_stream_extension_api and not simply from c_fnd_stream_extension_service_svc)


Reply


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