Question

Streams help

  • 24 July 2020
  • 8 replies
  • 327 views

Userlevel 1
Badge +4

Hello,

I searched IFS online help for Streams - the titles exist for help topics but no text to be seen after clicking on subjects - and yes, I tried using different browsers besides IE. 

I’m looking for any information on streams.  I’m relatively new to the company.  They use streams for notifications of creation of customer orders.  I found the event action that sends to the stream.  Howver, I need to set up a new user to receive this stream.  I’m looking for a how-to on Streams.  Any advice appreciated. Thanks much!


8 replies

Userlevel 4
Badge +7

Hi,

Can I know the version of the IFS application you are using?

Regards,

Dharshika

Userlevel 7
Badge +21

twalterson,

On the event you will find a field called To. Add use your new user to that field and he/she will be included when sending out a stream the next time:

On the right side of the field you can find a button with three dots to select the user(s).

Steve

Userlevel 1
Badge +4

Hi!  so much appreciated on your responses!  We are on version 9.10

The Event Action for this stream notification is a SQL coded event.

DECLARE
   attr_       VARCHAR2(2000)  :='';
   status_     NUMBER          :=0;

BEGIN

        Client_Sys.Clear_Attr(attr_);
            Client_Sys.Add_To_Attr('ORDER_NO', '&NEW:ORDER_NO', attr_);

        status_ := IFSAPP.TRANSACTION_SYS.POST_LOCAL__(
                'EDCO_COORDINATORS_API.send_COORD_MESSAGE'
                , attr_
                , '###EDCO - SEND IFS STREAM MESSAGE ABOUT WEB ORDER TO COORD --- ORDER: &NEW:ORDER_NO'
                , sysdate
                , 'TRUE'
            );

END;

Userlevel 7
Badge +21

Ah thanks for sharing this with us.

In this event a clever way is found to a stream. A specially build program (EDCO_COORDINATORS_API) as been build for your company. If you are able to locate this package, you should try to locate procedure send_coord_message. That contains either a hardcoded list of employees that get the stream or more a more genius form to retrieve from somewhere in IFS a list of coordinators (my guess) that is getting the stream.

If you can share that procedure, either me or another technical person can help out.

Steve

Userlevel 1
Badge +4

Thanks for responding!  Yes it’s getting more involved as I dig deeper - here’s more code:

CREATE OR REPLACE PACKAGE IFSAPP.EDCO_COORDINATORS_API as

module_                       CONSTANT VARCHAR2(25) := 'EDCO';
lu_name_                      CONSTANT VARCHAR2(25) := 'EDCOCOORDINATORSAPI';
lu_prompt_                    CONSTANT VARCHAR2(25) := 'EDCOCOORDINATORSAPI';

EDCO_K__VERSION                CONSTANT VARCHAR2(8)  := '1.0';
EDCO_K__CRLF                   CONSTANT VARCHAR2(8)  := utl_tcp.CRLF;
EDCO_K__EXPAND_OUTPUT          CONSTANT BOOLEAN      := FALSE;
EDCO_K__DEBUG_OUTPUT           CONSTANT BOOLEAN      := TRUE;
EDCO_K__DEBUG_IDENTIFIER       CONSTANT VARCHAR2(64) := 'EDCO_COORDINATORS_API';
EDCO_K__ATTR_DATE_FORMAT       CONSTANT VARCHAR2(64) := 'YYYY-MM-DD-HH24.MI.SS';

EDCO_K__DEFAULT_VARCHAR2       CONSTANT VARCHAR2(8)  := ' ';
EDCO_K__DEFAULT_NUMBER         CONSTANT NUMBER       := 0;
EDCO_K__DEFAULT_DATE           CONSTANT DATE         := NULL;
EDCO_K__ALLOW_OBJECT_DUMP      CONSTANT VARCHAR2(16) := 'TRUE';

/*
   Created by RGOLDEN on 1/18/2019
*/

FUNCTION Get_Version RETURN NUMBER;

FUNCTION get_CUSTOMER_COORD_EMAILS(order_ IN VARCHAR2) RETURN VARCHAR2;
FUNCTION get_CUSTOMER_COORD_USERS(order_ IN VARCHAR2) RETURN VARCHAR2;
PROCEDURE send_COORD_EMAILS(attr_ IN OUT VARCHAR2);
PROCEDURE send_COORD_MESSAGE(attr_ IN OUT VARCHAR2);
FUNCTION get_ALL_COORD_USERS RETURN VARCHAR2;
PROCEDURE send_ALL_COORD_MESSAGE;
FUNCTION get_cust_cord_count(string_ IN VARCHAR2) RETURN NUMBER;
FUNCTION get_coord_rec_count(string_ IN VARCHAR2) RETURN NUMBER;
FUNCTION convert_DB_TO_COORD(coord_db_ IN VARCHAR2) RETURN VARCHAR2;
FUNCTION convert_COORD_TO_DB(coord_ IN VARCHAR2) RETURN VARCHAR2;

PROCEDURE Init;

end EDCO_COORDINATORS_API;
/

Userlevel 7
Badge +21

Nice job.

Now open the package body (maybe use right mouse button on the package that you have included above) and search for send_coord_message.

I assume it has quite a lot of lines, so I think that you have to attach it.

In IFS itself you may find it as follows:

If there is no data in the Body, then it has been compiled without debug. You will have to locate it via PL/SQL Developer, Toad, Oracle SQL Developer or DBeaver.

Steve

Userlevel 1
Badge +4

Narrowed it down and traced using TOAD - found a custom view which is feeding the API.  The IFS ID has a ‘2’ at end of name -complicating things - as the view only includes the original username without the ‘2’ (long story)  I activated the previous username in hopes of the email address (which is needed to populate the view) will be in play for Streams - That’s all I have for now - I need to dig further.  Thanks!  I will let you know what I find and thanks for your assistance!

Userlevel 7
Badge +21

Your quite welcome. What I sometimes do is prepare a new user group. I read thru the list of linked users to send out the mail. But that is maybe for later development.

Good that you were able to find the starting point of the issue.

Steve

Reply