Scheduling Service Invocations

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (21)

View Page History
\\
A wizard opens, showing three drop-down lists.
In the *Use Case* list, select *Use a Petals technical service*. *Miscellaneaous*.
In the *Petals Component* list, select *Quartz // petals-se-quartz*.
In the *Component Usage* list, select *Consume a Petals service (or Expose it outside the bus)*.
In the *Component Version* list, select the version of the Petals-SE-Quartz that you are using in Petals.

In particular, it defines the interface, service and end-point names of the service that will be invoked regularly.

!petals-studio-tuto-consumes-quartz-2.jpg!

\\
{note}
A service is identified by a triplet, interface, service and end-point names. This triplet is unique in a Petals topology.
When you consume a service, the service is selected in a set. This set is defined by the invocation properties.

If the 3 fields are set in the consume properties, then the set will contain at most 1 result (there can be only 1 service with this ID).
If 2 fields are set, then the third one is considered as a wildcard and the set will larger.

Consume possibilities are the following ones:
* By interface, service and end-point names.
* By interface and service names.
* By interface name only.
{note}

\\
You can obviously fill-in these fields by hand.
However, the most efficient way is to use the [Petals Services explorer|Getting familiar with the Petals Services view] (provided it was populated).
Click *Select a service*. A selection dialog shows up, providing filtering assistance.

!petals-studio-tuto-consumes-quartz-2bis.jpg!

\\

This page requires information related to the CDK.
If the service to consume is described by a WSDL, then there is a list of the possible operations that can be invoked.
You Otherwise, you have three parameters to complete here (others are optional or have default values):
* The name space of the invoked operation's name (WSDL operations are QNames).
* The local part of the invoked operation's name (WSDL operations are QNames).
* The Message Exchange Pattern (MEP).

\\
With this component, only operations that work with the *InOnly* MEP can be invoked.
The wizard only shows these operations.

The meaning of all the CDK parameters for Quartz can be found in the documentation of the [Petals-SE-Quartz|petalscomponents:Petals-SE-Quartz] component.
When the invocation is created, the static XML message is sent with the given MEP, and addressed to the invoked operation of the target service (this service being identified by the triplet service, interface and end-point name).
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<!--
JBI descriptor for the Petals' "petals-se-quartz" component (Quartz).
Originally created for the version 1.1 of the component.
-->
<jbi:jbi version="1.0"
xmlns:gen0="http://petals.ow2.org/components/hello/version-3.0" xmlns:generatedNs="http://petals.ow2.org/components/hl7/version-1"
xmlns:generatedNs="http://petals.ow2.org"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:quartz="http://petals.ow2.org/components/quartz/version-1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<!-- Import a Service into Petals or Expose a Petals Service => use a BC. -->
<jbi:services binding-component="false">

<!-- Expose a Petals Service => consumes a Service. -->
<jbi:consumes
interface-name="generatedNs:HotelInterface" interface-name="generatedNs:PetalsHl7PortType"
service-name="generatedNs:HotelService" service-name="generatedNs:PetalsHl7Service"
endpoint-name="HotelEndpoint"> endpoint-name="PetalsHl7ServicePort">

<!-- CDK specific elements -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:operation>gen0:sayHelloOperation</petalsCDK:operation>
<petalsCDK:operation xmlns:sendInOnlyNs="http://petals.ow2.org/components/hl7/version-1">sendInOnlyNs:sendInOnly</petalsCDK:operation>
<petalsCDK:mep>InOnly</petalsCDK:mep>

<!-- Component specific elements -->
<quartz:cron-expression>0 0 12 * * ? </quartz:cron-expression>
<quartz:content><![CDATA[<!-- Put the XML message to send here -->