IBM ACE V12 Developer study materials
IBM ACE V12 Developer study resources

IBM ACE V12 Developer practice questions

One question at a time. Build your IBM ACE V12 Developer understanding.

First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.

Continue in the practice tool above to load more questions, 50 at a time.

Question 1Planning and designing integration solutions

An integration designer needs a message flow component that can route a single input message to one of several output terminals based on the evaluation of successive XPath expressions. Which IBM App Connect Enterprise node provides this behavior?

  1. Filter node
  2. Compute node
  3. Route node Correct answer.
  4. Throw node

Explanation

The Route node evaluates an ordered list of XPath expressions against the incoming message and propagates the message to the terminal associated with the first expression that evaluates true. It can also send unmatched messages to a default terminal. This makes it suited to multi-way branching, unlike a Filter node which only performs a binary true/false test.

Question 2Planning and designing integration solutions

A solution architect is choosing a transport for a new message flow that must expose a synchronous request/reply interface to many external consumers over the internet with minimal coupling. Which approach best fits IBM App Connect Enterprise design guidance?

  1. Use a WebSphere MQ queue with a fixed correlation ID per consumer
  2. Configure a JMS provider bound to a single internal topic
  3. Require each consumer to place a file in a shared monitored directory
  4. Expose an HTTP or REST endpoint through an HTTPInput or RESTInput node Correct answer.

Explanation

HTTP and REST input nodes let external consumers invoke a flow synchronously over standard web protocols, which minimizes coupling and avoids bespoke client libraries. File-based and queue-based transports assume specific client infrastructure that external internet consumers may not have. A single internal topic also constrains fan-out and coupling.

Question 3Planning and designing integration solutions

In IBM App Connect Enterprise, which construct is used to group related message flows and resources so they can be versioned, deployed, and managed as a single unit?

  1. Application Correct answer.
  2. Library
  3. Integration node
  4. Message set

Explanation

An application is the deployable unit that packages message flows and their dependent resources for versioning and lifecycle management. Libraries hold reusable shared resources that applications can reference. Integration nodes are runtime servers, and message sets are legacy modeling artifacts.

Question 4Planning and designing integration solutions

A designer must ensure that a message flow processes messages in the order they were received from a single source, while still allowing parallel processing for other sources. Which IBM App Connect Enterprise feature should be used?

  1. A single additional instance on the integration server
  2. Message flow ordering through the MQInput node with a fixed backout queue
  3. Additional instances of the message flow with a configurable instance pool Correct answer.
  4. Barrier nodes placed at every terminal

Explanation

The additional instances property on a message flow controls how many threads process that flow, and ordering can be preserved per source by configuring the flow to process messages sequentially for a given key. Instance pools let the designer tune concurrency while retaining per-source ordering. A single instance limits throughput for all sources.

Question 5Planning and designing integration solutions

When designing an integration solution that must call an external REST service, which IBM App Connect Enterprise node is specifically intended to invoke a REST API and parse its response?

  1. SOAPRequest node
  2. MQOutput node
  3. RESTRequest node Correct answer.
  4. HTTPRequest node

Explanation

The RESTRequest node is designed to invoke RESTful services, supporting OpenAPI-based definitions and structured parsing of JSON responses. The HTTPRequest node sends generic HTTP requests but lacks REST-specific modeling. SOAPRequest targets SOAP web services, and MQOutput targets message queues.

Question 6Planning and designing integration solutions

A team is designing a solution that must transform XML to JSON and also apply validation against a schema before forwarding. Which combination of IBM App Connect Enterprise features best supports this design?

  1. Mapping node followed by a Validate node using a generated model Correct answer.
  2. JavaCompute node followed by a FlowOrder node
  3. Compute node followed by a Trace node
  4. XSLTransform node followed by a Route node

Explanation

A Mapping node can transform between XML and JSON using graphical mappings, and a Validate node checks the message against a message model or schema. Combining them enforces structure before forwarding. Trace and Route nodes do not perform schema validation.

Question 7Planning and designing integration solutions

Which IBM App Connect Enterprise concept allows a designer to define reusable message model definitions that multiple applications can share without duplicating schema artifacts?

  1. A policy project containing the schema
  2. A message flow with a subflow per application
  3. A shared library referenced by applications Correct answer.
  4. A copy of the schema in each application

Explanation

Shared libraries hold reusable resources such as message model definitions, and applications reference them to avoid duplication. Copying schemas into each application duplicates maintenance. Subflows and policy projects serve different purposes and do not provide the shared schema repository behavior described.

Question 8Planning and designing integration solutions

A designer needs to implement a message flow that must correlate request and response messages arriving on separate queues. Which IBM App Connect Enterprise feature is most appropriate?

  1. A single MQInput node reading both queues
  2. A Collector node without a timeout
  3. Aggregation nodes with a timeout and correlation path Correct answer.
  4. A Compute node that writes a static correlation ID

Explanation

Aggregation nodes such as AggregateRequest, AggregateReply, and AggregateControl support correlating multiple related messages, including timeout handling and correlation paths. This is the built-in pattern for request/response fan-in across queues. A static correlation ID cannot distinguish individual requests.

Question 9Planning and designing integration solutions

Which statement best describes the role of a policy in an IBM App Connect Enterprise solution design?

  1. It replaces the need for message flows in simple integrations
  2. It externalizes configurable properties so flows can be redeployed without code changes Correct answer.
  3. It stores message schemas for validation at runtime
  4. It defines the deployment order of integration servers

Explanation

Policies externalize configurable properties such as credentials, endpoints, and timeouts so that operational changes do not require modifying and rebuilding flows. They complement message flows rather than replace them, and they do not store schemas or define server deployment order.

Question 10Planning and designing integration solutions

A solution must handle a high volume of small messages with low latency and guaranteed delivery between internal systems. Which transport choice aligns best with IBM App Connect Enterprise design guidance?

  1. FTP file transfer of batched files
  2. Shared database polling every minute
  3. IBM MQ queues with persistent messaging Correct answer.
  4. Email notifications per message

Explanation

IBM MQ with persistent messaging provides assured delivery and low-latency asynchronous transport suited to high-volume small messages. File transfer, email, and polling introduce latency and weaker delivery guarantees. These alternatives also complicate error handling at volume.

Question 11Planning and designing integration solutions

A designer wants to expose an existing message flow as a REST API with a documented interface that clients can discover. Which IBM App Connect Enterprise capability supports this?

  1. Publishing the flow's ESQL source as documentation
  2. Exporting the BAR file to clients
  3. Generating a WSDL from the message flow
  4. Defining a REST API project with an OpenAPI document and implementing it with REST nodes Correct answer.

Explanation

A REST API project uses an OpenAPI document to define the interface, and REST nodes implement the operations. This provides a discoverable, documented contract. ESQL source, WSDL, and BAR files are not client-facing REST interface definitions.

Question 12Planning and designing integration solutions

When designing error handling for a message flow, which approach provides centralized handling of unhandled exceptions across multiple flows in an application?

  1. Add a Trace node after every terminal
  2. Set the backout threshold to zero
  3. Configure a failure terminal on input nodes and route to a shared error subflow Correct answer.
  4. Rely on the integration server log only

Explanation

Routing the failure terminal of input nodes to a shared error-handling subflow centralizes exception processing and avoids duplicating logic. Relying only on logs loses structured handling, and setting a backout threshold to zero does not implement error processing. Trace nodes are diagnostic rather than corrective.

Question 13Planning and designing integration solutions

Which IBM App Connect Enterprise artifact is produced by the toolkit and deployed to an integration server to install message flows and their resources?

  1. Project interchange file
  2. Message set
  3. Policy project
  4. BAR file Correct answer.

Explanation

A BAR file is the deployable archive that contains compiled message flows, message models, and related resources for deployment to an integration server. Project interchange files are for sharing toolkit projects, and policy projects and message sets are design-time artifacts.

Question 14Planning and designing integration solutions

A designer must ensure idempotent processing so that a duplicate inbound message does not create a duplicate downstream record. Which design technique is most appropriate?

  1. Track a unique business key in a persistent store and check it before processing Correct answer.
  2. Increase the number of additional instances
  3. Add a timeout to the input node
  4. Enable message flow tracing at debug level

Explanation

Idempotency requires detecting duplicates using a unique business key persisted across restarts, then skipping or deduplicating before side effects occur. Increasing instances or enabling tracing does not prevent duplicate processing. Input timeouts affect waiting behavior, not duplicate detection.

Question 15Planning and designing integration solutions

Which node should a designer use to split a large repeating message into individual messages for downstream processing?

  1. Splitter node Correct answer.
  2. Resequence node
  3. Filter node
  4. Compute node

Explanation

The Splitter node divides a message containing repeating elements into separate messages that propagate individually. A Compute node can transform content but does not provide built-in splitting semantics. Filter and Resequence nodes handle routing and ordering respectively.

Question 16Planning and designing integration solutions

A solution designer is evaluating whether to use a subflow versus a shared library for common processing logic. Which consideration favors a subflow?

  1. The logic is embedded in the calling flow and shares its deployment lifecycle Correct answer.
  2. The logic must be independently versioned and deployed
  3. The logic must be configured by policies at runtime
  4. The logic must be shared across many applications with separate release cycles

Explanation

A subflow is embedded within a message flow, so it shares the parent flow's deployment lifecycle and cannot be independently deployed. Shared libraries suit independently versioned, cross-application reuse. Policy-driven configuration is orthogonal to the subflow-versus-library decision.

Question 17Planning and designing integration solutions

Which IBM App Connect Enterprise feature enables a designer to model a message format from a schema such as an XSD or JSON schema for parsing and validation?

  1. Integration service
  2. Message model Correct answer.
  3. Flow exerciser
  4. Policy set

Explanation

A message model is built from schema artifacts such as XSD or JSON schema and is used by the parser and validation nodes to interpret and validate messages. Policy sets govern WS-Security, the Flow Exerciser tests flows, and integration services expose flows as interfaces.

Question 18Planning and designing integration solutions

A designer needs to route messages to different queues based on the value of a field, and also needs to record the routing decision for auditing. Which design pattern best fits?

  1. A single Compute node that writes to all queues
  2. A Route node with each terminal connected to an MQOutput node and a shared audit subflow Correct answer.
  3. A Collector node with a timeout
  4. A Filter node with a Trace node on the false terminal only

Explanation

A Route node evaluates expressions and directs messages to terminals, each of which can connect to an MQOutput node for the target queue. A shared audit subflow invoked on each path records the decision. A single Compute node writing to all queues would duplicate messages rather than route them.

Question 19Planning and designing integration solutions

Which statement correctly describes how an integration service differs from a message flow in IBM App Connect Enterprise?

  1. An integration service replaces the need for an integration server
  2. An integration service can only be invoked by MQ
  3. An integration service stores message schemas for validation
  4. An integration service exposes a flow as a discoverable interface with a defined operation Correct answer.

Explanation

An integration service wraps a message flow and exposes it as an interface with a defined operation that can be discovered and invoked. It runs on an integration server rather than replacing it, is not restricted to MQ, and does not serve as a schema repository.

Question 20Planning and designing integration solutions

A designer must choose between synchronous and asynchronous interaction for a long-running batch process. Which design consideration most strongly favors asynchronous messaging?

  1. The caller expects low-latency interactive behavior
  2. The caller should not block while the batch completes Correct answer.
  3. The caller requires an immediate response payload
  4. The caller needs a strict request-response contract

Explanation

Asynchronous messaging decouples the caller from long-running processing so it does not block waiting for completion. Immediate responses, strict request-response contracts, and interactive low-latency expectations favor synchronous interaction. These requirements conflict with long-running batch durations.

Question 21Planning and designing integration solutions

Which node allows a designer to implement custom transformation logic in ESQL within a message flow?

  1. Compute node Correct answer.
  2. Mapping node
  3. XSLTransform node
  4. JavaCompute node

Explanation

The Compute node executes ESQL to manipulate message content, including creating and modifying message trees. Mapping nodes use graphical maps, XSLTransform uses XSLT, and JavaCompute uses Java. Each targets a different implementation language.

Question 22Planning and designing integration solutions

A designer wants to test a message flow with sample input and observe message propagation through each terminal without deploying to a remote server. Which IBM App Connect Enterprise tool supports this?

  1. BAR file editor
  2. Integration server log
  3. Flow Exerciser in the toolkit Correct answer.
  4. Policy editor

Explanation

The Flow Exerciser lets a developer send sample messages and visually observe propagation through the flow in the toolkit. Server logs record runtime events but do not provide interactive flow visualization. BAR and policy editors configure deployment and runtime behavior rather than testing.

Question 23Planning and designing integration solutions

A solution must guarantee that messages are processed exactly once even when the integration server restarts mid-processing. Which design approach is most defensible?

  1. Rely on the input node's default retry behavior
  2. Log message content before processing and ignore restarts
  3. Enable additional instances to increase throughput
  4. Persist processing state transactionally with the side effect, using MQ syncpoint coordination Correct answer.

Explanation

Exactly-once semantics require coordinating the message consumption and the side effect within a single transactional unit, such as MQ syncpoint, with persisted state. Additional instances and default retries can cause duplicates on restart. Logging alone does not prevent reprocessing.

Question 24Planning and designing integration solutions

Which IBM App Connect Enterprise capability allows a designer to define reusable error and logging logic that multiple flows can invoke as a single unit?

  1. A separate integration server per flow
  2. A subflow referenced by multiple message flows Correct answer.
  3. A policy project per flow
  4. A message set per flow

Explanation

A subflow packages reusable flow logic, including error and logging handling, and can be referenced by multiple message flows. Separate servers, policy projects, and message sets do not provide reusable flow logic. They address runtime isolation, configuration, and modeling respectively.

Question 25Developing message flows with ESQL and Java

In ESQL, which statement correctly declares a variable that can hold a reference to a shared row in the SharedRow environment?

  1. DECLARE myRef REFERENCE TO SharedRow.Row; Correct answer.
  2. DECLARE SHARED myRef ROW;
  3. DECLARE myRef SHARED ROW;
  4. DECLARE myRef ROW SHARED;

Explanation

A reference variable in ESQL is declared with DECLARE ... REFERENCE TO followed by the qualified name of the shared row, such as SharedRow.Row. This binds the variable so it can be passed to CREATE ... SHARED or PROPAGATE without copying the row.

Question 26Developing message flows with ESQL and Java

A Compute node has its Compute Mode set to LocalEnvironment and Message. Which ESQL statement is required to send the message body to the next node?

  1. RETURN;
  2. SET OutputRoot = InputRoot;
  3. PROPAGATE TO TERMINAL 'out'; Correct answer.
  4. RETURN TRUE;

Explanation

When Compute Mode is LocalEnvironment and Message, the node does not automatically propagate the message. You must explicitly use PROPAGATE to send the assembled message tree to an output terminal.

Question 27Developing message flows with ESQL and Java

Which ESQL statement correctly assigns the value of a database column to an OutputRoot field, using a SELECT that returns a single row?

  1. SET OutputRoot.XMLNSC.Msg.Name = THE(SELECT ITEM C.Name FROM Database.Customer AS C WHERE C.Id = 1); Correct answer.
  2. MOVE C.Name TO OutputRoot.XMLNSC.Msg.Name FROM Database.Customer AS C;
  3. SET OutputRoot.XMLNSC.Msg.Name = FIELD(C.Name);
  4. SET OutputRoot.XMLNSC.Msg.Name = SELECT C.Name FROM Database.Customer AS C;

Explanation

THE(SELECT ITEM ...) extracts a single scalar value from a query that returns one row and one column. Without THE and ITEM, the query returns a row list rather than a scalar, which cannot be assigned to a simple field.

Question 28Developing message flows with ESQL and Java

What is the purpose of the EVAL function in ESQL?

  1. It compiles an ESQL module at runtime.
  2. It validates a message against a schema.
  3. It evaluates a string expression as ESQL and returns the result. Correct answer.
  4. It evaluates a condition and returns TRUE or FALSE.

Explanation

EVAL takes a character string containing an ESQL expression and evaluates it dynamically at runtime, returning the resulting value. It is useful when the expression to evaluate is only known at execution time.

Question 29Developing message flows with ESQL and Java

Which ESQL statement correctly creates a new shared row and stores a reference to it in the variable myShared?

  1. SET myShared = CREATE SHARED ROW; Correct answer.
  2. CREATE SHARED ROW myShared;
  3. SET myShared = SHARED ROW();
  4. CREATE FIELD myShared TYPE SHARED;

Explanation

The CREATE statement with the SHARED ROW keyword creates a shared row and returns a reference to it. That reference must be assigned to a declared REFERENCE variable using SET.

Question 30Developing message flows with ESQL and Java

In ESQL, which function returns the number of elements in a repeating field?

  1. SIZE
  2. LENGTH
  3. COUNT
  4. CARDINALITY Correct answer.

Explanation

CARDINALITY returns the number of occurrences of a repeating field or list. COUNT is used within SELECT to count rows and LENGTH returns the length of a string.

Question 31Developing message flows with ESQL and Java

A message flow must invoke a Java method from ESQL. Which combination correctly declares and calls the external Java method?

  1. DECLARE myMethod JAVA PROCEDURE com.example.MyClass.myMethod();
  2. DECLARE myMethod EXTERNAL PROCEDURE java.lang.String com.example.MyClass.myMethod(IN arg CHARACTER); Correct answer.
  3. EXTERNAL PROCEDURE com.example.MyClass.myMethod(CHARACTER arg);
  4. DECLARE myMethod EXTERNAL PROCEDURE java.lang.String myClass.myMethod();

Explanation

An external Java method is declared with DECLARE ... EXTERNAL PROCEDURE, giving the fully qualified class and method name plus parameter definitions. The declared name is then called like any other ESQL procedure.

Question 32Developing message flows with ESQL and Java

Which Java class must a Java Compute node's class extend to process messages in IBM App Connect Enterprise?

  1. com.ibm.broker.javacompute.MbJavaComputeNode
  2. com.ibm.broker.plugin.MbJavaComputeNode Correct answer.
  3. com.ibm.broker.plugin.MbComputeNode
  4. com.ibm.broker.javacompute.MbNode

Explanation

A Java Compute node class extends com.ibm.broker.plugin.MbJavaComputeNode and overrides the evaluate method to process the message assembly. The MbElement and MbMessage classes come from the same plugin package.

Question 33Developing message flows with ESQL and Java

In a Java Compute node, which method signature correctly overrides the entry point that receives the message assembly?

  1. public void process(MbMessageAssembly inAssembly)
  2. public void evaluate(MbMessage inMessage)
  3. public MbMessageAssembly run(MbMessageAssembly assembly)
  4. public void evaluate(MbMessageAssembly inAssembly) throws MbException Correct answer.

Explanation

The Java Compute node calls the evaluate method, which receives an MbMessageAssembly and may throw MbException. Inside it you obtain the input message, build the output assembly, and propagate.

Question 34Developing message flows with ESQL and Java

In a Java Compute node, which call propagates the output message assembly to the 'out' terminal?

  1. outAssembly.propagate();
  2. getOutputTerminal("out").send(outAssembly);
  3. propagate(outAssembly);
  4. getOutputTerminal("out").propagate(outAssembly); Correct answer.

Explanation

Propagation is performed on an output terminal obtained from the node. You call getOutputTerminal with the terminal name and then propagate the assembled message assembly.

Question 35Developing message flows with ESQL and Java

Which Java class provides access to the elements of a message tree in a Java Compute node?

  1. MbMessage
  2. MbAssembly
  3. MbTree
  4. MbElement Correct answer.

Explanation

MbElement represents a node in the message tree and provides navigation and value methods such as getFirstChild, getNextSibling, and getValueAsString. MbMessage represents the message part of the assembly.

Question 36Developing message flows with ESQL and Java

In ESQL, which statement correctly declares and initializes an integer variable to 10?

  1. DECLARE counter INT = 10;
  2. DECLARE counter INTEGER INITIALIZE 10;
  3. INTEGER counter := 10;
  4. DECLARE counter INTEGER 10; Correct answer.

Explanation

ESQL declares variables with DECLARE name TYPE value, where the initial value follows the type without an equals sign. The type keyword is INTEGER.

Question 37Developing message flows with ESQL and Java

Which ESQL clause correctly handles the case where a SELECT returns no rows, providing a default value?

  1. Wrap the SELECT in IF EXISTS ... THEN ... ELSE ... END IF. Correct answer.
  2. Assign the result inside a CASE expression that tests for NULL.
  3. Use THE with a COALESCE function around the SELECT.
  4. Use the SINGLE clause with an ELSE default.

Explanation

ESQL provides IF EXISTS to test whether a SELECT returns rows, allowing an ELSE branch to supply a default value. THE(SELECT ...) with no rows returns NULL rather than a default.

Question 38Developing message flows with ESQL and Java

What does the ESQL PASSTHRU statement do?

  1. It executes a native SQL statement directly against a database using the specified ODBC data source. Correct answer.
  2. It forwards the message to another message flow by name.
  3. It copies the input tree to the output tree.
  4. It passes the message unchanged to the next node.

Explanation

PASSTHRU sends a database-native SQL statement to the named data source, bypassing ESQL's own query syntax. It is used for vendor-specific SQL that ESQL cannot express.

Question 39Developing message flows with ESQL and Java

In ESQL, which statement correctly iterates over all occurrences of a repeating field named Item in OutputRoot?

  1. LOOP OVER OutputRoot.XMLNSC.Order.Item AS refItem DO ... END LOOP;
  2. FOR refItem AS OutputRoot.XMLNSC.Order.Item[] DO ... END FOR;
  3. DECLARE refItem REFERENCE TO OutputRoot.XMLNSC.Order.Item; WHILE LASTMOVE(refItem) DO ... MOVE refItem NEXTSIBLING; END WHILE; Correct answer.
  4. FOREACH refItem IN OutputRoot.XMLNSC.Order.Item DO ... END FOREACH;

Explanation

To iterate a repeating field, declare a reference to the first occurrence and loop while LASTMOVE is true, advancing with MOVE ... NEXTSIBLING. The FOR ... AS ... DO syntax applies to list variables, not message tree fields.

Question 40Developing message flows with ESQL and Java

Which ESQL function creates a new message tree field element programmatically rather than by assignment?

  1. CREATE FIELD Correct answer.
  2. NEW FIELD
  3. ADD FIELD
  4. SET FIELD

Explanation

CREATE FIELD adds a new field to the message tree and returns a reference to it, which is useful for dynamic field names. SET FIELD and ADD FIELD are not ESQL statements.

Question 41Developing message flows with ESQL and Java

In ESQL, which statement correctly casts a character value to an integer?

  1. CAST INTEGER myChar
  2. INTEGER(myChar)
  3. CONVERT(myChar TO INTEGER)
  4. CAST(myChar AS INTEGER) Correct answer.

Explanation

The CAST function converts a value from one data type to another using the syntax CAST(value AS type). It returns NULL if the conversion is not possible.

Question 42Developing message flows with ESQL and Java

What is the effect of the ESQL statement SET OutputRoot = InputRoot; in a Compute node?

  1. It propagates the input message to the out terminal.
  2. It creates a reference alias so later changes to OutputRoot also change InputRoot.
  3. It copies the input message tree so OutputRoot is a separate tree that can be modified independently. Correct answer.
  4. It deletes the input tree after copying.

Explanation

Assigning InputRoot to OutputRoot copies the message tree by value, so subsequent modifications to OutputRoot do not affect the input. This is the standard way to start building the output from the input.

Question 43Developing message flows with ESQL and Java

Which ESQL statement correctly declares a namespace so that subsequent references can use a short prefix?

  1. DECLARE ns1 NAMESPACE 'http://example.com/ns'; Correct answer.
  2. DECLARE NAMESPACE ns1 'http://example.com/ns';
  3. SET NAMESPACE ns1 TO 'http://example.com/ns';
  4. NAMESPACE ns1 = 'http://example.com/ns';

Explanation

A namespace prefix is declared with DECLARE prefix NAMESPACE 'uri', after which fields can be referenced as prefix:fieldName. The URI must be enclosed in single quotes.

Question 44Developing message flows with ESQL and Java

In a Java Compute node, which method returns the root element of the input message tree?

  1. inAssembly.getRootElement()
  2. inAssembly.getInputRoot()
  3. inAssembly.getMessage().getTree()
  4. inAssembly.getMessage().getRootElement() Correct answer.

Explanation

The message assembly contains an MbMessage, and getRootElement on that message returns the root MbElement of the tree. From there you navigate to the parser-specific body such as XMLNSC or JSON.

Question 45Developing message flows with ESQL and Java

Which ESQL statement is used to raise an exception that can be caught by an enclosing handler?

  1. SIGNAL SQLSTATE '75000';
  2. THROW EXCEPTION; Correct answer.
  3. CALL THROW();
  4. RAISE ERROR;

Explanation

The THROW statement raises an ESQL exception that propagates up the call stack and can be handled by a surrounding handler. It is the standard way to signal an error condition from ESQL.

Question 46Developing message flows with ESQL and Java

In ESQL, which construct correctly handles an exception raised in a procedure?

  1. BEGIN ... HANDLER ... END;
  2. ON ERROR ... END;
  3. BEGIN ... EXCEPTION WHEN ... THEN ... END; Correct answer.
  4. TRY ... CATCH ... END TRY;

Explanation

ESQL uses BEGIN ... END blocks with an EXCEPTION section that lists WHEN handlers for specific SQL states or error codes. The handler runs when an exception is raised inside the block.

Question 47Developing message flows with ESQL and Java

Which Java class is used to create a new message in a Java Compute node?

  1. new MbMessage() Correct answer.
  2. MbMessage.create()
  3. new MbMessage(inputMessage)
  4. MbMessageFactory.newMessage()

Explanation

A new MbMessage is created with the no-argument constructor, and its tree is then built using createElement or similar methods. The output assembly is then constructed from the new message.

Question 48Developing message flows with ESQL and Java

In ESQL, which statement correctly assigns the current timestamp to an output field?

  1. SET OutputRoot.XMLNSC.Msg.Ts = GETDATE();
  2. SET OutputRoot.XMLNSC.Msg.Ts = CURRENT_TIMESTAMP; Correct answer.
  3. SET OutputRoot.XMLNSC.Msg.Ts = NOW();
  4. SET OutputRoot.XMLNSC.Msg.Ts = TIMESTAMP();

Explanation

CURRENT_TIMESTAMP is the ESQL special register that returns the current date and time as a TIMESTAMP value. It can be assigned directly to a field.

Question 49Developing message flows with ESQL and Java

A developer needs to pass a reference to a shared row between two ESQL modules in the same message flow. Which approach is valid?

  1. Declare the reference variable in a shared module so both modules can reference it.
  2. Pass the reference as a parameter to a procedure declared in a shared ESQL file. Correct answer.
  3. Store the shared row reference in a static variable of type SHARED ROW.
  4. Store the reference in the LocalEnvironment tree and read it back in the other module.

Explanation

Shared row references can be passed as REFERENCE parameters to ESQL procedures, allowing multiple modules to operate on the same shared row. The row itself persists in the SharedRow environment.

Question 50Developing message flows with ESQL and Java

An ESQL Compute node must copy the input message body to the output and then add a new field named Status. Which statement correctly creates the field in the output message tree?

  1. CREATE FIELD OutputRoot.XMLNSC.Order.Status TYPE NameValue VALUE 'NEW'; Correct answer.
  2. DECLARE Status FIELD OutputRoot.XMLNSC.Order.Status TYPE NameValue;
  3. SET OutputRoot.XMLNSC.Order.Status = 'NEW';
  4. CREATE FIELD OutputRoot.XMLNSC.Order.Status TYPE NameValue;

Explanation

CREATE FIELD with the TYPE NameValue clause instantiates a new element in the message tree and can assign its initial value through the VALUE clause. Plain assignment with SET only works when the target path already resolves to an existing element.