Parameter | Required/Optional | Description |
---|---|---|
api_version | Required | A string that matches the API version this document is for. |
source_association_key | Required | A key generated by TeamForge Orchestrate that links incoming work items with the appropriate source server. |
Example: "source_association_key": "6t5qM5AuLLWLkmqFJeKp" | ||
workitem_settings | Required | Tracker configuration details. |
Field | Required/Optional | Description |
---|---|---|
event_time | Required | A string containing a timestamp in UTC timezone and RFC 3339 format. |
url | Required | A string with the browse URL for the system. Orchestrate will append an individual work item's id to that url to link back to the work item |
tracker | Required | Tracker configuration information. A JSON object describing the structure of the tracker. |
Accepted values
|
The following code examples are Copyright 2020 CollabNet, Inc., licensed under the Apache License, Version 2.0 (the "License"); you may not use this code except in compliance with the License. You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0]
{ "api_version": "1", "source_association_key" : "150e8951-19e1-4066-8b74-601026dd6cde", "workitem_settings" : { "url": "http://www.example.com/jira", "event_time": "2012-10-02T17:15:32.320Z", "tracker": { "name": "Orchestrate/Stories", "id": "01234567abcdef01234567", "key":"ORC", "regex": "ORC-\d+", "icon": "http://www.example.com/jira/browse/bug.jpig", "statuses": [ {"name": "Open", "id": "abcdef"}, {"name": "In progress", "id": "123abc"}, {"name": "Closed", "id": "456123"} ] } } }
require 'amqp' QUEUE = 'orchestrate.work_items' WORK_ITEM_CONFIGURATION = ' { "api_version": "1", "source_association_key" : "150e8951-19e1-4066-8b74-601026dd6cde", "workitem_settings" : { "url": "http://www.example.com/jira", "event_time": "2012-10-02T17:15:32.320Z", "tracker": { "name": "Orchestrate/Stories", "id": "01234567abcdef01234567", "key":"ORC", "regex": "ORC-\d+", "icon": "http://www.example.com/jira/browse/bug.jpig", "statuses": [ {"name": "Open", "id": "abcdef"}, {"name": "In progress", "id": "123abc"}, {"name": "Closed", "id": "456123"} ] } } }' # Event loop EventMachine.run do connection = AMQP.connect('amqp://guest:guest@example-mq') # Set up our RabbitMQ information channel = AMQP::Channel.new(connection) queue = channel.queue(QUEUE, :auto_delete => false, durable: true) exchange = channel.direct('') # Publish the work item configuration and exit the loop exchange.publish WORK_ITEM_CONFIGURATION, :routing_key => queue.name do connection.disconnect {EventMachine.stop} end end