Showing posts with label remedy ticket creation. Show all posts
Showing posts with label remedy ticket creation. Show all posts

Thursday, October 22, 2009

Remedy Integration - Common Operations

This section want to give create ticket operation / step

CREATE TICKET

Will let you create a ticket on a particular form of the Remedy Server with the fields you has populated.

// creates entry
Entry entry = (Entry)entryFactory.newInstance();

// populates context into the entry - from last posting (Create Context)
entry.setContext( context );

// set the name of the form name
entry.setSchemaID( new NameID( ARS_FORMNAME ) );

// This is an array of EntryItem, which contains the number of
// fields to store to Remedy. Assume there are only two fields.
EntryItem[] entryItems=new EntryItem[2];

// assumes the field ID is 100 for this field.
entryItems[0] = new EntryItem(new FieldID(100), new Value (“some value”));

// assumes the field ID is 2 for this field.
entryItems[1] = new EntryItem(new FieldID(2), new Value(“test value”));

// set the entry items to the entry.
entry.setEntryItems( entryItems );

// creates the ticket in remedy
entry.create();

// releases memory used by this entry.
entryFactory.releaseInstance( entry );

I hope this serves like a beginners remedy integration tutorial, next post will be on update and retreive tickets.

Monday, October 19, 2009

Remedy Integration - Common Operations

You can call it step 1 of remedy integration with your application (using Java API, C, .NET API's are also avaiable)

CREATING CONTEXT

This operation / step is to set a context which consists of server ip, port number, user name, password and so on. Fill in the details accordingly

// Remedy Server IP
public static String ARS_SERVER = "";

// Remedy Port Number
public static int ARS_PORT = "";

// Remedy RPC number, usually 0
public statis int ARS_RPC = "";

// Remedy Language, usually blank
public static String ARS_LANGUAGE = “”;

// Remedy Form Name
public static String ARS_FORMNAME =”SAMPLE_JOE_FORM”;

// Remedy User ID
public static String ARS_USER = “joelj”;

// Remedy User Password
public static String ARS_PASSWORD = “mypass”;

ARServer context = new ARServerUser(ARS_USER, ARS_PASSWORD, ARS_LANGUAGE, ARS_SERVER);

Util.ARSetServerPort(context, new NameID(context.getServer()), ARS_PORT, ARS_RPC);

Following posts will talk about Creating, Updating and Retreiving remedy tickets.

Make sure you create a sample form in your (dev) remedy server to play around.