Event Driven Message Processing in AAE

Hi SDNers,
I wanted to know if PI 7.1 EhP1 supports event driven message processing on AAE, means can I bypass ABAP engine by configuring the scenario with ICo (Integrated Configation) and still use the event driven message processing of PI?
Regards,
Gautam Purohit

Hi Gautam Purohit,
"Event-Driven Message Processing" is concept related to Integration Engine. So if your are using AAE (skipping IE), you cannot use it. [Link1|http://help.sap.com/saphelp_nwpi711/helpdata/en/7a/00143f011f4b2ee10000000a114084/frameset.htm]
I think "Event-Driven Message Processing" and ccBPM are not related.
Regards,
Raghu_Vamsee

Similar Messages

  • IDoc Packaging on Event Driven Message Processing Message Filter

    Hi Experts,
    I am testing IDoc Packaging on Event Driven Message Processing and I got struck at scheduling the job.
    My scenario is IDoc to File. I have created sender and receiver id with coresponding interfaces. While creating the message filter I have selected outbound channel --> IDoc Packaging Option n I have took 10 as Package Size in Messages. In SM 36 I have created JOB and in the step I have selected SXMS_START_JOBS.
    Now my problem is while creating the JOB in SM36 what condition should I select? How do I test this event driven message processing with IDoc packaging??
    Please guide me...
    Regards
    SAPTOTAL

    in the event, you should also have a job for RSEOUT00 scheduled so that the IDocs are send out as a package

  • Prioritized Messages in combination with Event-Driven Message Processing

    Hi,
    our Scenario (EO): Sender A sends large IDocs to Receivers X and Y (> Split)
    1.
    What we did first:
    Prioritized Message Processing
    Sender A sends large Messages, therefore we prioritzied Messages in the IE with EO_MSG_SIZE_LIMIT > 4000.
    This works fine: Messages are queued in XBTL and XBTM and afterwards they are send to Receiver X and Y.
    2.
    What we did next:
    Event-Driven Message Processing
    Now we want to send the Message from Sender A to Receiver X directly and to Receiver Y at night time.
    We add Event-Driven Message Processing, Sender- and ReceiverID for A and Y,Job and so on...
    On it's own (without Prioritized Message Processing), this works fine: The messages are send at night time.
    But in combination (Event-Driven + Prioritized Message Processing) the messages only passes the Prioritized Message Processing and the Event-Driven is ignored.
    Our "Hop-List" for Split A to Y was:
    1. XBTL
    2. XBTJ2008...
    3. XBTM
    But actually all Messages passes:
    1.XBTL
    2.XBTM
    Why are the messages not filtered for the Event-Driven Message Processing (in combination with the Prioritized Message Processing)?

    It was an error in the SourceCode and is now corrected by SAP:
    Hinweis 1295746 - XI Runtime: Fehler in Ereignisgesteuerte Messageverarbeitung
    Olaf

  • Packaging required for event-driven message processing

    Hi,
    Could you pls. let me know whether message packaging is required for using event-driven message processing in Integration Server (PI).
    Also can we use event-driven message processing in Integration Server (PI) for outbound HTTP adapter interface.
    Thanks.
    Best Regards,
    Gajendra.

    What is your scenario and why exactly your are looking for event-based message processing?
    Normally those are background jobs which triggers the services(inbuilt ) and makes the process designed by us to run.
    In case ofR/3 its possible to do so i.e to trigger messages based on event like incase of proxt to PI can be done through Event-based
    Rajesh

  • Event driven messaging in XI

    Hi All,
    We are using event driven messaging configuration in SXMB_ADM transaction to send IDOC in package to R/3.
    I have tried to create multiple Msg filters for the same sender and receiver which in turn creates multiple job IDs.
    But when we run the test, i see that the first Job execute and the msgs are assigned to the first Job but not all the Job IDs created.
    Does XI not allow for multiple filters to be created for same sender and receivers.
    pls help!
    regards,
    tony

    Hi All,
    We are using event driven messaging configuration in SXMB_ADM transaction to send IDOC in package to R/3.
    I have tried to create multiple Msg filters for the same sender and receiver which in turn creates multiple job IDs.
    But when we run the test, i see that the first Job execute and the msgs are assigned to the first Job but not all the Job IDs created.
    Does XI not allow for multiple filters to be created for same sender and receivers.
    pls help!
    regards,
    tony

  • Statistics (overview) for Synchronous messages processed via AAE

    Hello,
    We are on PI 7.11
    Is there any way to get synchronous messages processed via AAE displayed on RWB Message Monitor Overview view?
    Maybe there is some parameter available similar to messaging.syncMessageRemover.removeBody for persisting payloads for sync messages.
    Thanks!
    Best Regards,
    Artsiom Anichenka

    Mark,
    But I think there is already (PI 7.11) a possibility to persist payloads for java-only sync messages. I was mentioning this parameter in my original post:
    messaging.syncMessageRemover.removeBody
    this parameter is true by default and if you set it to false payloads will not be deleted, but this is not our aim. We want payloads to be deleted from sync messages, but we also want to see those messages on RWB MessageMonitor for overview.
    For me this is somekind of frustrating that the overview page doesn't really give you overview of what is happening on your system, like what and how many messages where processed...
    So can you please specify what is really planned for 7.31. Did you meant that parameter I am mentioning above or we will really get sync java-only messages to overview?
    Best Regards,
    Artsiom Anichenka

  • Event Driven Kanban Process

    Hi,
    I tried to follow the process mentioned from other threads on this subject but with no success.
    Scenario:
    Header Mtrl: A
    Assembly: B [E-D KANBAN]
    Assembly: C
    There is a requirement for A=100 ea. There must be dep.req generated for B = 100 ea??? as per the event  [correct me if I am wrong].
    How to exectute the above scenario?
    Can anyone guide with the work flow and TCode for the E-D Kanaban.
    Thanks in advance.
    Cheers
    Ramesh

    Q: Well, if the scenario which I mentioned is not ED what exactly it is - Please ellobrate?
    This scenario is not ED, this can be addressed by Kanban with MRP controller, in case of inhouse production it will be with
      the replinshment type 4 .
    Q 1/ If we need to manually create the ED signal in PK23 what advantage does we have compared to the MRP run?
    It is not any advantage, this is how it can be done.
    Q 2/ There is a order for A=100 ea. How the person responsible in the supply area will know that there is a req. for B (ED KANBAN) material?. How the person responsible for the supply area track these requirements?
    In case if you are working with kanban + MRP , you can use the program SAPMMPKC which can be scheduled in the BG to 
    Q 3/ I appreciate, if you could throw more light in - how automatically the ED is triggered once it receive the order/req.?
    Apart from all, i think you need to read more about the kanban and how it works.
    Generally kanban are used where there is continious flow between 2 workcentres.
    ie ) a constant demand and supply .
    10 containes flows between 2 workcentres in which one workcentre is supply and  another one is demand then kanban is used.
    during such situation if you are planing to increase one container just for 1 weeek to meet your increased demand ( like christmas, new year) then Event driven kanban can be used.
    Hope most of your querries are answered . you can also check about kanban here
    http://sap-pphelp.blogspot.com/2010/01/kanban-inhouse-production.html
    Reg
    Dsk

  • How to view the payload of a Message if it processed through AAE

    Hi All,
    Can anybody please tell me how to view the payload if the message processed through Advance Adapter Engine.
    I have developed a SOAP to SOAP interface by using Advance Adapter Engine and it is working fine I can see the messages in Runtime Work Bench(RWB) but when I clicked on the Sender and Receiver Adapter I can't see the payload so I am wondering if anyone knows how to view the payload or it is possible to view the payload if the message was processed through Advance Adapter Engine (AAE).
    Is there any setting or properties available in NWA to enable or disable the payload of AAE?
    Thanks,
    Iqbal

    Hi All,
    Unfortunately I can only see the SOAP Document but no Payload.
    here is what I can see
    - <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    - <SOAP:Header xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    - <sap:Main xmlns:sap="http://sap.com/xi/XI/Message/30" versionMajor="3" versionMinor="0" soap:mustUnderstand="1">
      <sap:MessageClass>ApplicationResponse</sap:MessageClass>
      <sap:ProcessingMode>synchronous</sap:ProcessingMode>
      <sap:MessageId>75e50f37-9bef-11e0-af98-000027d151a6</sap:MessageId>
      <sap:RefToMessageId>7597008d-9bef-11e0-a027-000027d151a6</sap:RefToMessageId>
      <sap:TimeSent>2011-06-21T10:15:59Z</sap:TimeSent>
    - <sap:Sender>
      <sap:Party agency="http://sap.com/xi/XI" scheme="XIParty" />
      <sap:Service>Srv_xxxxx__Sender_SOAP_AAE_BS</sap:Service>
      </sap:Sender>
    - <sap:Receiver>
      <sap:Party agency="http://sap.com/xi/XI" scheme="XIParty" />
      <sap:Service>Srv_xxxxx_Sender_SOAP_AAE_BS</sap:Service>
      </sap:Receiver>
      <sap:Interface namespace="urn:xxxxxxxx.com:pi:A_TEST:HTTP_TO_SOAP_AAE">SI_OS_xxxx_Request_AAE</sap:Interface>
      </sap:Main>
    - <sap:ReliableMessaging xmlns:sap="http://sap.com/xi/XI/Message/30" soap:mustUnderstand="1">
      <sap:QualityOfService>BestEffort</sap:QualityOfService>
      </sap:ReliableMessaging>
      <sap:System xmlns:sap="http://sap.com/xi/XI/Message/30" soap:mustUnderstand="1" />
    - <sap:HopList xmlns:sap="http://sap.com/xi/XI/Message/30" soap:mustUnderstand="1">
    - <sap:Hop timeStamp="2011-06-21T10:15:59Z" wasRead="false">
      <sap:Engine type="AE">af.dgx.dbdgx66</sap:Engine>
      <sap:Adapter namespace="http://sap.com/xi/XI/System">XIRA</sap:Adapter>
      <sap:MessageId>75e50f37-9bef-11e0-af98-000027d151a6</sap:MessageId>
      </sap:Hop>
      </sap:HopList>
      </SOAP:Header>
    - <SOAP:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    - <sap:Manifest xmlns:sap="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink">
    - <sap:Payload xlink:type="simple" xlink:href="cid:payload-75e51c499bef11e0a13a000027d151a6atsap.com">
      <sap:Name>maindocument</sap:Name>
      <sap:Description>main document</sap:Description>
      <sap:Type>Application</sap:Type>
      </sap:Payload>
      </sap:Manifest>
      </SOAP:Body>
      </SOAP:Envelope>
    Do I need to do anything in NWA to enable the payload for Sender and Receiver?
    Thanks,
    Iqbal

  • Creating Event driven process chain

    Hi all,
    In my scenario there are two chains in which
    1. First chain is normal chain, which we are using to
    load business data.
    2. Second chain will contain start variant and one ABAP
    program that will call first chain and this second
    chain is event driven.
    So can anybody send me relevant documents or
    information regarding how to create event? How to
    schedule process chain using event? and also how to call
    process chain using ABAP program?
    Thanks & Regards
    Ajinkya Deodhar

    Hi,
    Look into the following links:
    http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
    Event collector:
    http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
    Creation of Event:
    http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
    Hope it hepls you

  • HELP Event-driven Process Chain

    HelloCommunity,
    I aim to develop a tool for modelling Business process using EPC (Event-driven Process Chain)
    I have just discovered Sirius, followed some tuturial....But when I started to
    design my own project I got stuck.. My metamodel still complicated and I couldn't deal with some cases and some specific relationship.
    Could you please share with me some links or ressources for project similar to mine?
    Thank you in advance
    Regards,

    Hi Han, Le 28/07/2015 15:56, han sirius a écrit :
    > HelloCommunity,
    >
    > I aim to develop a tool for modelling Business process using EPC
    > (Event-driven Process Chain)
    >
    > I have just discovered Sirius, followed some tuturial....But when I
    > started to
    > design my own project I got stuck.. My metamodel still complicated and I
    > couldn't deal with some cases and some specific relationship.
    >
    > Could you please share with me some links or ressources for project
    > similar to mine?
    Did you try the tutorial [1] ?
    You might discover concrete examples of modeling tools created with
    Sirius for various use-cases in the gallery [2] and lab [3].
    You will also find the documentation in [4].
    >
    > Thank you in advance
    >
    > Regards,
    >
    >
    Regards
    Maxime - Obeo
    Need professional services for Sirius?
    http://www.obeodesigner.com/sirius
    [1] https://www.eclipse.org/sirius/getstarted.html
    [2] https://www.eclipse.org/sirius/gallery.html
    [3] https://www.eclipse.org/sirius/lab.html
    [4] https://www.eclipse.org/sirius/doc/

  • New LabHSM Toolkit - Agile development of complex event-driven maintainable LabVIEW applications with active objects / actors based on a universal Hierarchical State Machine / statechart template.

    Dear Fellow LabVIEW programmers:
    Most of the systems you deal with are reactive. It means that their
    primary function is constant interaction with their environment by
    sending and receiving events. But most likely, they can have something
    happening inside them too, even when they are not processing messages
    received from outside. So, such systems have to continuosly react to
    external and internal stimuli. Right? Moreover, most likely, they
    consist of subsystems that are reactive too and, in turn, can have
    their own "life", to an extent independent from other parts (with
    which they still communicate, of course). Reactive (event-driven)
    systems are more naturally modeled with active objects. So, why then
    should we try to model and code them with GOOP and its passive
    ("dead"!) objects?
    "Flat" State Machines have been known for decades to have severe
    limitations. It's been more than 20 years since Dr. Harel invented
    Hierarchical State Machines (statecharts) to fight those limitations.
    Then why does NI still tout the same old good Moore FSM as the
    ultimate tool for event-driven programming in LabVIEW in its $995
    State Diagram KIt?
    The LabHSM toolkit we are happy to present, makes it possible to
    easily create and then maintain complex event-driven applications in
    LabVIEW as a collection of HSM-driven active object VIs using a higher
    level of abstraction and agile software development methodologies.
    These active object VIs are created based on a universal Hierarchical
    State Machine ( HSM or statechart ) template. So. all your code looks
    similar regardless of its functionality!
    We all love just jump to code, right? However, to be good boys, we
    need to do design first. Then implement it in code. If the logic is
    modified we need to redo the design first and then redo the code. When
    using LabHSM where behavior information is abstracted into a separate
    HSM data file editable with a supplied editor, there is no need for
    coding separate from design any more. The modified behavior becomes
    code automatically as soon as the HSM file is saved. Design is code!
    The implementation basically follows Dr. Samek's Quantum Programming
    paradigm. (see http://www.quantum-leaps.com). However, as already
    mentioned, LabHSM stores the behavior information in a file separate
    from the code itself. It also adds state dependent priorities to
    events, a separate queue for public events/messages, and, of course,
    some LabVIEW specific code like capturing front panel user events and
    putting them into the private Events queue. Communication and
    instantiation functions are also rather specific for LabVIEW.
    It is available for UNLIMITED PERIOD trial. Please visit
    http://www.labhsm.com for details and download. The site also contains
    references which you may want to check to learn more about
    hierarchical state machines and active object computing.
    Since this is our debut we will appreciate any comments and
    suggestions. Our contact information is available on our site, of
    course.
    Have a G'day!

    Symtx is currently hiring the following position. Please contact me if interested.
    Amy Cable
    Symtx, HR
    [email protected]
    Symtx, the leading supplier of functional test equipment, hires the brightest & most talented engineering professionals to design & manufacture complex custom electronic systems for advanced technology leaders in the defense, aerospace, communications, medical, transportation & semiconductor industries. Symtx’ challenging & dynamic work environment seeks to fill openings with highly qualified electronic engineering design professionals.The ideal candidate will be responsible for defining the requirements, software design and code development, and integration of test control software for custom functional test systems. Candidate should be familiar with data acquisition concepts, instrument control, complex test, measurement and calibration algorithm development and definition and implementation of control interfaces to hardware. Prefer familiarity with instrument control via GPIB, VXI, MXI, RS-232 desirable. Requires BS/MSEE and 3 -7+ yrs of experience in one or several of the following test applications in a Windows NT/2000/XP environment using Labwindows CVI, TestStand, Labview, Visual Basic, C++ and knowledge of RF systems is a plus. Job responsibilities will include software design, development, integration, team leadership, and interfacing with customers( includes PDR’s & CDR’s).

  • Dbms_scheduler - dbms_aq - dbms_aqadm - event driven job runs only once/sec

    hi, i tried here to process events with 2 jobs... surprisingly i had to call dbms_lock.sleep(1) to be able to enqueue events
    at inserts in a row ... even more surprisingly the enqueuing doesn't function if the processing (prc_evsched) lasts some seconds...
    how must the code be changed to be able to enqueue all events after the inserts without any sleep()?
    and how must the code be changed to be able to enqueue all events with a proc (prc_evsched) running longer?
    thanx in advance for your help!
    --evsched
    h4.
    --to remove all test-objects
    h4.
    --test table
    h4.
    --define the object type to act as the payload for the queue
    h4.
    --creating the event queue
    h4.
    --creating the proc for the prog/job
    h4.
    --creating the proc for the prog/job
    h4.
    --creating the program
    h4.
    --creating the first job (for parallel execution)
    h4.
    --creating the second job (for parallel execution)
    h4.
    --test block
    h4.
    --test scenarios/results
    h4.
    --to remove all test-objects
    DECLARE
    exc_ora_27475 EXCEPTION; --ora-27475: <job_name> muss job sein
    PRAGMA EXCEPTION_INIT (exc_ora_27475, -27475);
    exc_ora_27476 EXCEPTION; --ora-27476: <program_name> ist nicht vorhanden
    PRAGMA EXCEPTION_INIT (exc_ora_27476, -27476);
    exc_ora_24010 EXCEPTION; --ORA-24010: QUEUE SYSGIS.EVENT_QUEUE ist nicht vorhanden
    PRAGMA EXCEPTION_INIT (exc_ora_24010, -24010);
    exc_ora_24002 EXCEPTION; --ORA-24002: QUEUE_TABLE SYSGIS.EVENT_QUEUE_TAB ist nicht vorhanden
    PRAGMA EXCEPTION_INIT (exc_ora_24002, -24002);
    exc_ora_4043 EXCEPTION; --ORA-04043: Objekt T_EVENT_QUEUE_PAYLOAD ist nicht vorhanden
    PRAGMA EXCEPTION_INIT (exc_ora_4043, -4043);
    exc_ora_942 EXCEPTION; --ORA-00942: Tabelle oder View nicht vorhanden
    PRAGMA EXCEPTION_INIT (exc_ora_942, -942);
    exc_ora_2289 EXCEPTION; --ORA-02289: Sequence ist nicht vorhanden.
    PRAGMA EXCEPTION_INIT (exc_ora_2289, -2289);
    v_fpos PLS_INTEGER := 1;
    BEGIN
    v_fpos := 10;
    BEGIN
    --remove job
    SYS.DBMS_SCHEDULER.DROP_JOB(job_name=> 'job_evsched', FORCE=>TRUE);
    EXCEPTION WHEN exc_ora_27475 THEN NULL;
    END;
    v_fpos := 12;
    BEGIN
    --remove job
    SYS.DBMS_SCHEDULER.DROP_JOB(job_name=> 'job_evsched_2', FORCE=>TRUE);
    EXCEPTION WHEN exc_ora_27475 THEN NULL;
    END;
    v_fpos := 20;
    BEGIN
    --remove program
    SYS.DBMS_SCHEDULER.DROP_PROGRAM(program_name=>'prg_evsched',FORCE=>TRUE);
    EXCEPTION WHEN exc_ora_27476 THEN NULL;
    END;
    v_fpos := 30;
    BEGIN
    -- stop the event queue.
    DBMS_AQADM.stop_queue (queue_name => 'evsched_event_queue');
    EXCEPTION WHEN exc_ora_24010 THEN NULL;
    END;
    v_fpos := 40;
    BEGIN
    -- drop the event queue.
    DBMS_AQADM.drop_queue (queue_name => 'evsched_event_queue');
    EXCEPTION WHEN exc_ora_24010 THEN NULL;
    END;
    v_fpos := 50;
    BEGIN
    -- Remove the queue table.
    DBMS_AQADM.drop_queue_table(queue_table => 'tab_evsched_event_queue');
    EXCEPTION WHEN exc_ora_24002 THEN NULL;
    END;
    v_fpos := 60;
    BEGIN
    -- remove type
    EXECUTE IMMEDIATE 'DROP TYPE typ_evsched_payload';
    EXCEPTION WHEN exc_ora_4043 THEN NULL;
    END;
    v_fpos := 70;
    BEGIN
    -- remove table
    EXECUTE IMMEDIATE 'DROP TABLE tab_evsched';
    EXCEPTION WHEN exc_ora_942 THEN NULL;
    END;
    v_fpos := 80;
    BEGIN
    -- remove sequence
    EXECUTE IMMEDIATE 'DROP SEQUENCE seq_evsched';
    EXCEPTION WHEN exc_ora_2289 THEN NULL;
    END;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('v_fpos='||v_fpos);
    END;
    h4.
    --test table
    CREATE TABLE tab_evsched
    ( id NUMBER
    , sys_date DATE
    , status VARCHAR2(1)
    , processed VARCHAR2(1) DEFAULT 'N'
    , processed_by varchar2(128)
    GRANT DELETE, INSERT, SELECT, UPDATE ON tab_evsched TO PUBLIC
    CREATE SEQUENCE seq_evsched
    h4.
    --define the object type to act as the payload for the queue
    CREATE OR REPLACE TYPE typ_evsched_payload AS OBJECT
    ( event_name VARCHAR2(30)
    , tab_evsched_id NUMBER
    , daterf DATE
    h4.
    --creating the event queue
    BEGIN
    -- Create a queue table to hold the event queue.
    DBMS_AQADM.create_queue_table
    ( queue_table => 'tab_evsched_event_queue'
    , queue_payload_type => 'typ_evsched_payload'
    , multiple_consumers => TRUE
    , COMMENT => 'Queue Table For Event Messages'
    -- Create the event queue.
    DBMS_AQADM.create_queue
    ( queue_name => 'evsched_event_queue'
    , queue_table => 'tab_evsched_event_queue'
    , queue_type => DBMS_AQADM.NORMAL_QUEUE
    , max_retries => 0
    , retry_delay => 0
    , dependency_tracking => FALSE
    , comment => 'Test Object Type Queue'
    , auto_commit => FALSE
    -- Start the event queue.
    DBMS_AQADM.start_queue
    ( queue_name => 'evsched_event_queue'
    END;
    h4.
    --creating the proc for the prog/job
    CREATE OR REPLACE PROCEDURE prc_evsched
    ( p_message IN typ_evsched_payload
    , p_job_name IN VARCHAR2
    IS
    BEGIN
    UPDATE tab_evsched
    SET processed = 'J'
    , processed_by = p_job_name
    , sys_date = p_message.daterf
    WHERE 1=1
    AND id = p_message.tab_evsched_id
    dbms_lock.sleep(5); --#sleep-1#
    COMMIT;
    END prc_evsched;
    h4.
    --creating the program
    DECLARE
    exc_ora_27476 EXCEPTION; --ora-27476: <program_name> ist nicht vorhanden
    PRAGMA EXCEPTION_INIT (exc_ora_27476, -27476);
    BEGIN
    BEGIN
    SYS.DBMS_SCHEDULER.DROP_PROGRAM(program_name=>'prg_evsched',FORCE=>TRUE);
    EXCEPTION
    WHEN exc_ora_27476 THEN
    NULL;
    END;
    SYS.DBMS_SCHEDULER.CREATE_PROGRAM
    ( program_name => 'prg_evsched'
    , program_type => 'STORED_PROCEDURE'
    , program_action => '"SYSGIS"."PRC_EVSCHED"'
    , number_of_arguments => 2
    , enabled => FALSE
    , comments => 'Program-Komponent für den Test von DBMS_SCHEDULER'
    --event message as the first param to prc_evsched 
    DBMS_SCHEDULER.DEFINE_METADATA_ARGUMENT
    ( program_name => 'prg_evsched'
    , argument_position => 1
    , metadata_attribute => 'EVENT_MESSAGE'
    --name of the job as the second param to prc_evsched 
    SYS.DBMS_SCHEDULER.define_program_argument
    ( program_name => 'prg_evsched'
    , argument_name => 'p_job_name'
    , argument_position => 2
    , argument_type => 'VARCHAR2'
    , default_value => 'dummy'
    --enable program   
    SYS.DBMS_SCHEDULER.ENABLE(NAME=>'prg_evsched');
    END;
    h4.
    --creating the first job (for parallel execution)
    DECLARE
    exc_ora_27475 EXCEPTION; --ora-27475: <job_name> muss job sein
    PRAGMA EXCEPTION_INIT (exc_ora_27475, -27475);
    BEGIN
    BEGIN
    --remove job
    SYS.DBMS_SCHEDULER.DROP_JOB(job_name=> 'job_evsched', FORCE=>TRUE);
    EXCEPTION WHEN exc_ora_27475 THEN NULL;
    END;
    DBMS_SCHEDULER.create_job
    ( job_name => 'job_evsched'
    , program_name => 'prg_evsched'
    , start_date => SYSTIMESTAMP
    , event_condition => 'tab.user_data.event_name = ''MYEVENT'''
    , queue_spec => 'evsched_event_queue'
    , auto_drop => FALSE
    , enabled => FALSE
    SYS.DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE
    ( job_name => 'job_evsched'
    , argument_name => 'p_job_name'
    , argument_value => 'job_evsched'
    SYS.DBMS_SCHEDULER.ENABLE(NAME=>'job_evsched');
    END;
    h4.
    --creating the second job (for parallel execution)
    DECLARE
    exc_ora_27475 EXCEPTION; --ora-27475: <job_name> muss job sein
    PRAGMA EXCEPTION_INIT (exc_ora_27475, -27475);
    BEGIN
    BEGIN
    --remove job
    SYS.DBMS_SCHEDULER.DROP_JOB(job_name=> 'job_evsched_2', FORCE=>TRUE);
    EXCEPTION WHEN exc_ora_27475 THEN NULL;
    END;
    DBMS_SCHEDULER.create_job
    ( job_name => 'job_evsched_2'
    , program_name => 'prg_evsched'
    , start_date => SYSTIMESTAMP
    , event_condition => 'tab.user_data.event_name = ''MYEVENT'''
    , queue_spec => 'evsched_event_queue'
    , auto_drop => FALSE
    , enabled => FALSE
    SYS.DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE
    ( job_name => 'job_evsched_2'
    , argument_name => 'p_job_name'
    , argument_value => 'job_evsched_2'
    SYS.DBMS_SCHEDULER.ENABLE(NAME=>'job_evsched_2');
    END;
    h4.
    --test block
    DECLARE
    PROCEDURE pr_ins_tab_evsched
    ( p_id IN NUMBER
    , p_status IN VARCHAR2
    IS
    BEGIN
    INSERT INTO tab_evsched(id,status) VALUES (p_id, p_status);
    COMMIT;
    --enqueue the MYEVENT-event
    IF p_status = 'M' THEN
    --enqueue works in 1sekunden-taktung.... !?
    dbms_lock.sleep(1); --#sleep-2#
    DECLARE
    v_enqueue_options DBMS_AQ.enqueue_options_t;
    v_message_properties DBMS_AQ.message_properties_t;
    v_message_handle RAW(16);
    v_queue_msg typ_evsched_payload;
    BEGIN
    v_queue_msg := typ_evsched_payload
    ( event_name => 'MYEVENT'
    , tab_evsched_id => p_id
    , daterf => SYSDATE
    v_enqueue_options.VISIBILITY := DBMS_AQ.ON_COMMIT;
    v_enqueue_options.delivery_mode := DBMS_AQ.PERSISTENT;
    v_message_properties.PRIORITY := 1;
    v_message_properties.DELAY := DBMS_AQ.NO_DELAY;
    v_message_properties.EXPIRATION := DBMS_AQ.NEVER;
    v_message_properties.CORRELATION := 'TEST MESSAGE';
    DBMS_AQ.enqueue
    ( queue_name => 'evsched_event_queue'
    , enqueue_options => v_enqueue_options
    , message_properties => v_message_properties
    , payload => v_queue_msg
    , msgid => v_message_handle
    END;
    END IF;
    COMMIT;
    END pr_ins_tab_evsched;
    BEGIN
    DELETE tab_evsched;
    pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
    pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
    pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
    pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
    pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
    pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
    pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
    pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
    END;
    SELECT * FROM tab_evsched ORDER BY id;
    SELECT * FROM sysgis.tab_evsched_event_queue;
    h4.
    --test scenarios/resultsh
    h5.
    --test results #sleep-1#=5, #sleep-2#=0
    --job (job_evsched) runs only once, only the first event is enqued/processed
    ID SYS_DATE STATUS PROCESSED PROCESSED_BY
    9 22.03.2012 17:00:41 M J job_evsched
    10 (Null) M N (Null)
    11 (Null) M N (Null)
    12 (Null) M N (Null)
    13 (Null) M N (Null)
    14 (Null) M N (Null)
    15 (Null) M N (Null)
    16 (Null) M N (Null)
    h5.
    --test results #sleep-1#=0, #sleep-2#=1
    --jobs (job_evsched/job_evsched2) run alternately, every events are enqued/processed
    ID SYS_DATE STATUS PROCESSED PROCESSED_BY
    25 22.03.2012 17:04:31 M J job_evsched_2
    26 22.03.2012 17:04:32 M J job_evsched_2
    27 22.03.2012 17:04:33 M J job_evsched
    28 22.03.2012 17:04:34 M J job_evsched_2
    29 22.03.2012 17:04:35 M J job_evsched_2
    30 22.03.2012 17:04:36 M J job_evsched_2
    31 22.03.2012 17:04:37 M J job_evsched
    32 22.03.2012 17:04:38 M J job_evsched_2
    h5.
    --test results #sleep-1#=5, #sleep-2#=1
    --jobs (job_evsched/job_evsched2) run alternately, only two events are enqued/processed
    ID SYS_DATE STATUS PROCESSED PROCESSED_BY
    41 22.03.2012 17:07:42 M J job_evsched_2
    42 (Null) M N (Null)
    43 (Null) M N (Null)
    44 (Null) M N (Null)
    45 (Null) M N (Null)
    46 (Null) M N (Null)
    47 22.03.2012 17:07:48 M J job_evsched
    48 (Null) M N (Null)
    */

    hi, thank you for your (fast) answer! that is the solution to my problem!
    now i have a follow-up question:
    i've got a procedure, that runs between 1 and 2 minutes long. unlimited running lightweight jobs
    would freeze the db...
    how can the count of the parallel running lightweight-jobs be limited?
    according to the documentation it is not possible:
    There is no explicit limit to the number of lightweight jobs that can run simultaneously to process multiple instances of the event.
    However, limitations may be imposed by available system resources.
    could you explain to me, what it (...available system recources...) means?
    eventually what i would like to have: max. two parallel running (lightweight) jobs....
    thank you in advance, bye, á
    ps: can i attach a file to the post anyway?
    Edited by: user4786904 on 23.03.2012 07:22

  • Trigger a job using an event through a process chain

    Hi,
    After the success of 5metachain, I am using AND condition
    My requirement is as follows, it should trigger a job which needs to be after AND condition,
    I have created an event using sm64. Basically the client wants to trigger the job using the event through the process chain. I have tried test scenariou2019s using ABAP program (Process type) in the process chain but it is failing. Is there any other way to trigger a job using an event through a process chain? If ABAP program is the only option, can you please specify what all needs to be filled in the variant?
    Regards.
    Jerry

    Hi,
    Create a program like below,
    CALL FUNCTION 'BP_EVENT_RAISE'
      EXPORTING
        EVENTID = 'EVENT WHICH YOU HAVE CREATED'
    EXCEPTIONS
       BAD_EVENTID                  = 1
       EVENTID_DOES_NOT_EXIST       = 2
       EVENTID_MISSING              = 3
       RAISE_FAILED                 = 4
       OTHERS                       = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    search and include the program name which you have created above in the "ABAP program" process type which you are going to include in the process chain.
    Include the event which you have created in the start condition of the job.
    Note: No need of give any variant, because here we are calling only one function in this program.
    Regards,
    Sridevi.

  • Do we have any Event Driven functionality in Biztalk

    Hi,
    Do we have any in-build event driven functionality in Biztalk? time-bound like.
    Few scenarios:
    1. If orchestration is running more then 5 mints then it should be alerted to admin.
    2. Alert need to be raised if bulk of messages are suspended.
    Thanks

    Hi Narasaiah,
    If you don't have resource to go for SCOM/BizTalk360, then
    You can consider using some operation scripts using WMI/Operations DL/SQL query which can be executed periodically using a schedule task (or as service).
    This script can check for the condition as you have specified and send a notification.
    Following scripts can give you some idea. Note: These scripts are just to give you an idea and get started, they are not tested.
    WMI for an orchestration which is Active state for 5 minutes:
    strComputer = "."
    Dim dtCurretTime, dt5Mins
    dtCurretTime = Now ()
    dt5Mins = DateAdd("h",-5,dtCurretTime)
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\MicrosoftBizTalkServer")
    Set colItems = objWMIService.ExecQuery( _
    "SELECT * FROM MSBTS_ServiceInstance WHERE ServiceStatus = 4 AND ActivationTime >= dt5Mins",,48)
    If colItems.Count >0
    Wscript.Echo "Instance" & colItems.ServiceName" has been in Active state"
    End If
    Here the "MSBTS_ServiceInstance" would give you the details about the orchestration
    And SQL query to get the count of suspended message:
    SELECT
    count(InstancesSuspended.)uidInstanceID
    FROM InstancesSuspended
    LEFT OUTER JOIN [Services]
    on InstancesSuspended.uidServiceID = [Services].uidServiceID
    LEFT OUTER JOIN Modules
    on Modules.nModuleID = [Services].nModuleID
    LEFT OUTER JOIN Instances
    on Instances.uidInstanceId = InstancesSuspended.uidInstanceID
    WHERE InstancesSuspended.DtCreated between DATEADD(dd,-7,GETUTCDATE()) and GETUTCDATE()
    and InstancesSuspended.nErrorCategory=0
    Instances.nState = 4 or Instances.nState = 32
    //Instances.nState as State -- 4 = Suspended (resumable), 32 = Suspended (not resumable)
    ORDER BY InstancesSuspended.dtCreated desc
    As mentioned, fine-tune these scripts, run them in periodically and send notification if the condition matches.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Run Code Continuously in Event Driven State Machine

    Hi there, I was wondering what is the best way to run code continuously in an event driven state machine. Particularly, I am going off the JKI state machine. At the moment I put the code I want to run continuously (acquire from an instrument) in the timeout case of the event structure. When the user presses the button, the event sends the value 0 to the timeout terminal of the event structure (through a shift register). If the user stops the acquisition then the value -1 is sent to the timeout terminal. This is a tip that I took from an article by Mike Porter.
    Would it be better to run this process in a separate loop? Is a state machine a bad design choice for running code continuously? I don't like my current solution because if I have another process I'll have to start putting case structures into the timeout case. Also, if the process takes a while then the event structure will take a while to respond.
    Thanks for your input!

    AKA_TG wrote:
     Adding to that I believe Preview Queue element to read the data and Lossy  enqueue to transfer the I/O output, especially if the I/O device responds slowly. This should keep your event structure polling along very nicely during I/O calls to the other structure.
    I actually prefer to use an User Event to send the data to the main event structure and/or whoever else needs it.  I am not a fan of the lossy enqueue (loss of data).  At that point, I might as well just use a Notifier and/or global variable.

Maybe you are looking for