org.mule.modules

mule-module-jive

1.1.1
Namespacehttp://www.mulesoft.org/schema/mule/jive
Schema Locationhttp://www.mulesoft.org/schema/mule/jive/1.0/mule-jive.xsd
Version1.0
Minimum Mule Version3.2

Module Overview

Provides Jive connectivity to Mule:

  • Allows CRUD operations on Jive objects

Summary

Configuration
<jive:config>
Configure an instance of this module
Message Processors
<jive:count>
Counts all the instances of the given entity type
<jive:create>
Creates an entity of the given type.
<jive:delete>
Deletes an existent entity If there is no entity with the given id the system will throw a
JiveGenericException with the message returned from the server.
<jive:execute>
Executes a custom operation
If a wrong number of attributes is sent, or the operation requires an entity an none is sent, the system will repond with a
JiveGenericException.
<jive:get>
Retrieves the attributes for the entity of the given type and id.
<jive:get-user-id>
Answers the id of the logged user
<jive:update>
Updates an existent entity If the entity you are trying to update doesn't exist, the system thorws a
JiveGenericException with an aclaratory message.

Configuration

To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:jive="http://www.mulesoft.org/schema/mule/jive"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/jive
               http://www.mulesoft.org/schema/mule/jive/1.0/mule-jive.xsd">

      <!-- here goes your flows and configuration elements -->

</mule>

This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necesary as long as each carries its own name.

Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.

Attributes
TypeNameDefault ValueDescription
xs:string name Optional. Give a name to this configuration so it can be later referenced.
facade Optional. The jive facade
xs:string gatewayUri The base rest server url
xs:string password The password.
xs:string username The username to access the jive instance.

Message Processors

<jive:count>

Counts all the instances of the given entity type

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
type The entity type to be counted
Child Elements
Return Payload
  • The number of instances of the given type

<jive:create>

Creates an entity of the given type. If the entity already exists or cannot be created the system throws a JiveGenericException with the correspondat message. If the data pass in entity it's not the data expected the system will throw a JiveGenericException with the correspondant message.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
type The type of entity to create
Child Elements
<jive:entity>
The entity attributes
Return Payload
  • The jive response as a Map. Generally it will return the entity just created with additional data added by jive.

<jive:delete>

Deletes an existent entity If there is no entity with the given id the system will throw a JiveGenericException with the message returned from the server. If the number of arguments is wrong the system will throw a JiveGenericException

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
type The entity type
id The id of the entity to delete
Child Elements

<jive:execute>

Executes a custom operation

XML Sample
INCLUDE_ERROR
If a wrong number of attributes is sent, or the operation requires an entity an none is sent, the system will repond with a JiveGenericException.

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
operation The custom operation to be executed
id Optional. The path parameters to be added to the operation uri
Child Elements
<jive:entity>
Optional. The Map with the entity data to be send as payload
Return Payload
  • A Map with the server response

<jive:get>

Retrieves the attributes for the entity of the given type and id.

XML Sample
INCLUDE_ERROR
If the entity you are trying to get doesn't exist, the system will throw a JiveGenericException with the correponging message.

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
type The entity type
id The entity id
Child Elements
Return Payload
  • the entity attributes, as a String-Object Map

<jive:get-user-id>

Answers the id of the logged user

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
Child Elements
Return Payload
  • the user id

<jive:update>

Updates an existent entity If the entity you are trying to update doesn't exist, the system thorws a JiveGenericException with an aclaratory message.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
type The type of entity to update
Child Elements
<jive:entity>
The attributes of the entity