Appendix: Mobile Configurator COM API

This appendix lists the classes and methods of and PeopleSoft.MCfgProxy.

Click to jump to top of pageClick to jump to parent topicPeopleSoft.MCfgProxy Methods

PeopleSoft.MCfgProxy contains these methods.

Click to jump to top of pageClick to jump to parent topicStart

Initiates the startup sequence of the Mobile Configurator application. Call this method right after MCfg object creation and before other methods are called on Mobile Configurator. By default the MCfg application window is shown centered and normal.

Arguments

None

Return Values

Type: Integer

0 – Successful

1 – Fail

Click to jump to top of pageClick to jump to parent topicStop

Closes and shuts down the Mobile Configurator.

Arguments

None

Return Values

Type: Integer

0 – Successful

1 – Fail

Click to jump to top of pageClick to jump to parent topicShow

Shows/Restores the Mobile Configurator application window if it was previously hidden on a Hide call.

Arguments

None

Return Values

Type: Integer

0 – Successful

1 – Fail

Click to jump to top of pageClick to jump to parent topicHide

Hides the Mobile Configurator application.

Arguments

None

Return Values

Type: Integer

0 – Successful

1 – Fail

Click to jump to top of pageClick to jump to parent topicNewConfiguration(String sSolutionID)

Loads/starts a new configuration session based on the passed configuration ID.

Arguments

sSolutionID – a string value for the solution ID to load, i.e. “Sample”, “TelcoHub” etc.

Return Values

Type: Integer

0 – Success

1 – Fail

Click to jump to top of pageClick to jump to parent topicReConfigure(String sXML)

Reloads/restarts a configuration session based on the previously saved configuration xml formatted record that is passed in.

Arguments

sXML – a string containing the xml formatted configuration record that is to be reloaded for reconfiguration.

Return Values

Type: Integer

0 – Success

1– Fail

Click to jump to top of pageClick to jump to parent topicWaitForConfiguration(Integer nTimeout)

Gets the state of the configuration session or how it ended (timeout). In doing so, the method waits for the configuration session to end before returning the exit state of the session.

Arguments

nTimeout—length of time in seconds.

Return Values

Type: Integer

0 – Success

1 – Fail

2 – Timeout

3 – Cancel

5 – Configuration Timer Timeout

Click to jump to top of pageClick to jump to parent topicIsConfigurationReady

Gets the state of the configuration session. In contrast to WaitForConfiguration, this method does not wait for the configuration session to end to send the state but returns it immediately.

Arguments

None

Return Values

Type: Integer

0 – Success

1 –Fail

3 –Cancel

4 – In Progress

5 – Configuration Timer Timeout

Click to jump to top of pageClick to jump to parent topicGetConfiguration

Retrieves the xml formatted configuration of the configuration session.

Arguments

None

Return Values

Type: String

The xml formatted string of the configuration.

Click to jump to top of pageClick to jump to parent topicSetLabelToString(Integer nLabelID, String NewLabel)

Sets the specified label, which corresponds to the ID passed in, to the new label string passed in. The label is for the “Save” and “Cancel” menu items.

Arguments

NLabelID – ID of label whose string value is to be set .

Valid values are as follows:

0 – label for “Save”

1 – label for “Cancel”

NewLabel – string value that the label is to be set to.

Return Values

Type: Integer

0 – Success

1 – Fail

Click to jump to top of pageClick to jump to parent topicStartCountdown(Integer nCountdownTimeInMins, Integer nWarnLeftTimeInMins, String strWarnMessage, String strContinueLabel, String strStopLabel)

Initiates the countdown timers that set the maximum time duration for a configuration session.

Arguments

nCountdownTimeInMins—total length of time in minutes that the configuration can be worked on.

nWarnLeftTimeInMins—the time remaining in minutes that is left in the nCountdownTimeInMins argument, before a message appears to warn the user of the impending timeout, and to ask the user for a course of action (options are to Stop waiting for Mobile Configurator to return or to Continue to wait).

strWarnMessage—the message is displayed in the warning message dialog.

strContinueLabel—the string label for the button that is associated with the user choosing to continue with the configuration session.

StrStoplabel—the string label for the button that is associated with the user choosing to stop the configuration session and save it back to the order.

Return Values

Type: Integer

0 – Success

1 – Fail

Click to jump to top of pageClick to jump to parent topicStopCountdown

Stops the countdown timers that were previously initiated with the startcountdown method.

Arguments

None

Return Values

Type: Integer

0 – Success

1 – Fail

Click to jump to top of pageClick to jump to parent topicSample Application Client Code

The following is sample code included with the application.

Dim oMCfg As Object Set oMCfg = CreateObject("PeopleSoft.MCfgProxy") If (oMCfg.Start() = 1) Then MsgBox "Failed creating the configurator app" Set oMCfg = Nothing End End If oMCfg.Show oMCfg.StartCountdown(30, 10, "Config will timeout in 10 minutes!!", "Continue with session", "Save and return to order") oMCfg.NewConfiguration txtConfigID.Text Dim ret As Long 'timeout in 60 seconds ret = oMCfg.WaitForConfiguration(60) If (ret = 0) Then txtXML.Text = oMCfg.GetConfiguration() ElseIf (ret = 1) Then txtXML.Text = "Configuration failed" ElseIf (ret = 2) Then txtXML.Text = "Configuration timeout" ElseIf (ret = 3) Then txtXML.Text = "Configuration canceled by user" ElseIf (ret = 5) Then txtXML.Text = "Configuration timer timeout" End If oMCfg.StopCountdown oMCfg.Hide oMCfg.Stop Set oMCfg = Nothing