Receiving Messages from ActiveMQ Server

Perform the following steps after creating the ActiveMQ connection to transfer messages to the ActiveMQ server using Sigma Studio:

  1. Click the Data Source  icon on the existing ActiveMQ connection.

    Refer Connectors - ActiveMQ for more information on creating an ActiveMQ connection.




    The Create Request page appears.



  2. Enter a unique data source name in the Data Source Name field. In this example, ActiveMQ_DS is provided as the data source name.
  3. Enter the queue name in Queue Name field. Here, Transaction is provided as the queue name.
  4. Select Receive Message as the message transfer type field.
  5. Now, select an activity chain from the Activity Chain dropdown list, e.g. LIBRARY and select an action if required from the Current Action drop-down list, e.g. SUBMIT.

    The available Activity Chain options are: LIBRARY, STUDIO_MAINT (STUDIO MAINTENANCE) and NEW_CONNECTION_SCREEN (NEW CONNECTION SCREEN), whereas the available Current Action options are: PREINIT (PREINITIALIZATION), SAVE_DRAFT (SAVE_DRAFT), SUBMIT and DELETE.




  6. Click Save to save the ActiveMQ data source.

    When you try to exit the Data Source screen, before saving the configured ActiveMQ data source, a warning pop-up message appears, as shown in the following screen shot:

    • Click Cancel, if you do not want to exit the Data Source screen.
    • Click Ok, if you want to exit the Data Source screen.




    A success message for creating the data source appears as shown in the following screenshot:



  7. Click Ok.

    In order to trigger the ActiveMQ service connection, the CT platform's server-side API, CT.ftp must be used while passing the ExecutionContext action in a Java Handler class. Refer the following sample code snippet for better understanding on the triggering process:


    Here, on the following sample code snippet a new ExecutionContext action is created within which a map (HashMap) is built. The ActiveMQ datasource ID is passed along with the message as inputs to activate the connection request within which the CT.ftp API is passed to trigger this process.

    ExecutionContext ec = new ExecutionContext();
    		Map inputParams1 = new HashMap();
    		inputParams1.put("DATA_SRC_ID","ActiveMQ_DS");   // Here, ActiveMQ_DS refers to the Datasource ID.
    		inputParams1.put("STREAM_MESSAGE","HI Team!");        // Here, Hi Team! refers to the message.
    		ec.setInitialRequestData(inputParams1);	
    try {
    			CT.ftp(ec);
    		}
    		catch(Exception e){
    
    		}

Copyright © Intellect Design Arena Limited.

All rights reserved. These materials are confidential and proprietary to Intellect Design Arena Limited and no part of these materials should be reproduced, published in any form by any means, electronic or mechanical including photocopy or any information storage or retrieval system nor should the materials be disclosed to third parties without the express written authorization of Intellect Design Arena Limited.