Skip to main content

Hello,

 

So I want to create a workflow which does come verification and then sends a stream message so that the user can check the message here:

Does anybody know what is the IFS Rest API that i need to call or if i need to make some configurations to then call the method that will send the notification? And if i need to configure some URL so the message can be sent?

 

With best Regards,

Francisco Lopes

@FLopes  have you find a way to do that please?


@IFSRUNINNOVAL  @FLopes 

I haven’t tried myself yet. but looks like Projection StreamSubscriptions and EntitySet FndStreamMessages could be what you are looking for.

Cheers!

Damith


@dsj  thank you.

i’ll try it


@dsj  thank you

i have tried it in postman meanwhile 

So : to authenticate using postman, i’m using an ROPC workflow with a token and ifsapp as username

 

 

 

When using the GET method (with no parameter) i’m getting only notification for IFSAPP

 

When POSTING a new message with ToUser any existing user but IFSAPP : 

I’ll get the following error : 

When ToUser is IFSAPP, the message is created correctly

That is a good starting point.

maybe i should rethink the way i authenticate with ifs. ?

maybe in a workflow this limitation doesnt exist?


This is getting interested 🙂 As I think you should be able to send the notification to another user. Since you are getting a DB error, you could add ?odata-debug=json to the projection call tail and get the error stack and check how the no data error fires.

 

Cheers!

Damith


@dsj  i’m not yet able to read correctly the odata-debug :

If i’m not mistaken ,  and based on the debug information,  i should look at the stacktrace exception

 

 

for IFSAPP.STREAM_SUBSCRIPTIONS_SVC\", line 646 a CRUD CREATE method  :

STREAM_SUBSCRIPTIONS_SVC 646

That call the following procedure

STREAM_SUBSCRIPTIONS_SVC 1021

Have then added traces (cause why not?! )

Trace_sys

 

The problem is, i think, we are querying FND_STREAM

When reading the view behind it : 

 

 we see that we have a WHERE that filter values based on the connected user 

 

i don’t know for the moment if this is the intended behavior of the API or not


@dsj  ​@FLopes 

We had several discussions with IFS Support and the R&D team regarding the issue. According to their findings, the root cause of the problem is the attempt to create records directly in the FndStream entity. This entity was not designed for direct record creation. Instead, records must be created following a specific set of procedures.


When a record is added to the FndStream entity through the standard notification creation process, it triggers updates in several other areas to complete the workflow for notifications. The error occurs because, during these checks, the logic fails if the ToUser is not the same as the token-generated user or the logged-in user.

After further discussions, the R&D team agreed that enabling the creation of notifications through a workflow should be possible and could be addressed as a framework enhancement. However, this approach is currently not working due to the existing design of the FndStream entity.

 

Since this is classified as an enhancement,  IFS SUPPORT has created the following idea in the IFS Community, as requested by the R&D team:
https://community.ifs.com/ideas/support-for-sending-notifications-to-any-user-via-the-streamsubscriptions-svc-api-from-a-workflow-54497?postid=184075#post184075

Additionally, the limitation you encountered is not mentioned in the API documentation. IFS SUPPORT has asked the R&D team to include this information in the documentation, which is scheduled to be updated in the 25R1 version.

 

Regarding the standard process for creating notifications, there is currently no documentation available that outlines these steps. Unfortunately, IFS SUPPORT we are also not aware of the exact procedure since those are configurations.

 


Reply