Wizard samples
Basics
Example of uuid:
- Using UUID -> "373bcdd0-c082-4e7b-addd-e10ef813946e";
Suggested code sample
First, you must create the webservice object:
OKMWebservices ws = OKMWebservicesFactory.newInstance(host);
Then should login using the method "login". You can access the "login" method from webservice object "ws" as is shown below:
ws.login(user, password);
Once you are logged with the webservices the session is keep in the webservice Object. Then you can use the other API method
At this point you can use all the Wizardmethods from "wizard" class as is shown below:
ws.wizard.findByUser();
Methods
findByUser
Description:
Method | Return values | Description |
---|---|---|
findByUser() |
List<WizardNode> |
Returns a list of nodes with a wizard. |
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.util;
using com.openkm.sdk4csharp.bean;
using com.openkm.sdk4csharp.impl;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/openkm";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host);
try
{
ws.login(user, password);
List<WizardNode> list = ws.wizard.findByUser();
foreach (WizardNode wizardNode in list)
{
Console.WriteLine(wizardNode.toString());
}
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
}
}
}
deleteAll
Description:
Method | Return values | Description |
---|---|---|
deleteAll() |
void |
Remove all wizards of the user. |
Only wizards assigned to the user session will be removed. |
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.util;
using com.openkm.sdk4csharp.bean;
using com.openkm.sdk4csharp.impl;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/openkm";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host);
try
{
ws.login(user, password);
ws.wizard.deleteAll();
Console.WriteLine("Delete all");
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
}
}
}
addDigitalSignature
Description:
Method | Return values | Description |
---|---|---|
addDigitalSignature(String uuid) |
void |
Add digital signature in the wizard of a node. |
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.util;
using com.openkm.sdk4csharp.bean;
using com.openkm.sdk4csharp.impl;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/openkm";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host);
try
{
ws.login(user, password);
ws.wizard.addDigitalSignature("055b5206-35d0-4351-ba92-c304bbba7ddf");
Console.WriteLine("Add digital signature");
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
}
}
}
removeDigitalSignature
Description:
Method | Return values | Description |
---|---|---|
removeDigitalSignature(String uuid) |
void |
Remove digital signature in the wizard of a node. |
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.util;
using com.openkm.sdk4csharp.bean;
using com.openkm.sdk4csharp.impl;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/openkm";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host);
try
{
ws.login(user, password);
ws.wizard.removeDigitalSignature("055b5206-35d0-4351-ba92-c304bbba7ddf");
Console.WriteLine("Remove digital signature");
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
}
}
}
addShowWizardCategories
Description:
Method | Return values | Description |
---|---|---|
addShowWizardCategories(String uuid) |
void |
Add show wizard categories in the wizard of a node. |
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.util;
using com.openkm.sdk4csharp.bean;
using com.openkm.sdk4csharp.impl;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/openkm";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host);
try
{
ws.login(user, password);
ws.wizard.addShowWizardCategories("055b5206-35d0-4351-ba92-c304bbba7ddf");
Console.WriteLine("addShowWizardCategories");
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
}
}
}
removeShowWizardCategories
Description:
Method | Return values | Description |
---|---|---|
removeShowWizardCategories(String uuid) |
void |
Remove show wizard categories in the wizard of a node. |
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.util;
using com.openkm.sdk4csharp.bean;
using com.openkm.sdk4csharp.impl;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/openkm";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host);
try
{
ws.login(user, password);
ws.wizard.removeShowWizardCategories("055b5206-35d0-4351-ba92-c304bbba7ddf");
Console.WriteLine("removeShowWizardCategories");
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
}
}
}
addShowWizardKeywords
Description:
Method | Return values | Description |
---|---|---|
addShowWizardKeywords(String uuid) |
void |
Add show wizard keywords in the wizard of a node. |
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.util;
using com.openkm.sdk4csharp.bean;
using com.openkm.sdk4csharp.impl;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/openkm";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host);
try
{
ws.login(user, password);
ws.wizard.addShowWizardKeywords("055b5206-35d0-4351-ba92-c304bbba7ddf");
Console.WriteLine("addShowWizardKeywords");
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
}
}
}
removeShowWizardKeywords
Description:
Method | Return values | Description |
---|---|---|
removeShowWizardKeywords(String uuid) |
void |
Remove show wizard keywords in the wizard of a node. |
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.util;
using com.openkm.sdk4csharp.bean;
using com.openkm.sdk4csharp.impl;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/openkm";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host);
try
{
ws.login(user, password);
ws.wizard.removeShowWizardKeywords("055b5206-35d0-4351-ba92-c304bbba7ddf");
Console.WriteLine("removeShowWizardKeywords");
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
}
}
}
addShowWizardOCRDataCapture
Description:
Method | Return values | Description |
---|---|---|
addShowWizardOCRDataCapture(String uuid) |
void |
Add show wizard OCR data capture in the wizard of a node. |
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.util;
using com.openkm.sdk4csharp.bean;
using com.openkm.sdk4csharp.impl;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/openkm";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host);
try
{
ws.login(user, password);
ws.wizard.addShowWizardOCRDataCapture("055b5206-35d0-4351-ba92-c304bbba7ddf");
Console.WriteLine("addShowWizardOCRDataCapture");
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
}
}
}
removeShowWizardOCRDataCapture
Description:
Method | Return values | Description |
---|---|---|
removeShowWizardOCRDataCapture(String uuid) |
void |
Remove show wizard OCR data capture in the wizard of a node. |
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.util;
using com.openkm.sdk4csharp.bean;
using com.openkm.sdk4csharp.impl;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/openkm";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host);
try
{
ws.login(user, password);
ws.wizard.removeShowWizardOCRDataCapture("055b5206-35d0-4351-ba92-c304bbba7ddf");
Console.WriteLine("removeShowWizardOCRDataCapture");
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
}
}
}
addGroup
Description:
Method | Return values | Description |
---|---|---|
addGroup(String uuid, String group) |
void |
Add metadata group in the wizard. |
The parameter uuid is the unique node identifier. The parameter group is the group name. |
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.util;
using com.openkm.sdk4csharp.bean;
using com.openkm.sdk4csharp.impl;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/openkm";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host);
try
{
ws.login(user, password);
ws.wizard.addGroup("055b5206-35d0-4351-ba92-c304bbba7ddf", "okg:testing");
Console.WriteLine("addGroup");
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
}
}
}
removeGroup
Description:
Method | Return values | Description |
---|---|---|
removeGroup(String uuid, String group) |
void |
Remove metadata group in the wizard. |
The parameter uuid is the unique node identifier. The parameter group is the group name. |
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.util;
using com.openkm.sdk4csharp.bean;
using com.openkm.sdk4csharp.impl;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/openkm";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host);
try
{
ws.login(user, password);
ws.wizard.removeGroup("055b5206-35d0-4351-ba92-c304bbba7ddf", "okg:testing");
Console.WriteLine("removeGroup");
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
}
}
}
addWorkflow
Description:
Method | Return values | Description |
---|---|---|
addWorkflow(String uuid, String workflow) |
void |
Add a workflow in the wizard. |
The parameter uuid is the unique node identifier. The parameter workflow is the workflow name. |
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.util;
using com.openkm.sdk4csharp.bean;
using com.openkm.sdk4csharp.impl;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/openkm";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host);
try
{
ws.login(user, password);
ws.wizard.addWorkflow("055b5206-35d0-4351-ba92-c304bbba7ddf", "purchase");
Console.WriteLine("addWorkflow");
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
}
}
}
removeWorkflow
Description:
Method | Return values | Description |
---|---|---|
removeWorkflow(String uuid, String workflow) |
void |
Remove a workflow in the wizard. |
The parameter uuid is the unique node identifier. The parameter workflow is the workflow name. |
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.util;
using com.openkm.sdk4csharp.bean;
using com.openkm.sdk4csharp.impl;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/openkm";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host);
try
{
ws.login(user, password);
ws.wizard.removeWorkflow("055b5206-35d0-4351-ba92-c304bbba7ddf", "purchase");
Console.WriteLine("removeWorkflow");
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
}
}
}
setAutostart
Description:
Method | Return values | Description |
---|---|---|
setAutostart(String uuid) |
void |
Set auto-start to the wizard. |
Autostart should be always set as the last wizard option. |
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.util;
using com.openkm.sdk4csharp.bean;
using com.openkm.sdk4csharp.impl;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/openkm";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host);
try
{
ws.login(user, password);
ws.wizard.setAutostart("055b5206-35d0-4351-ba92-c304bbba7ddf");
Console.WriteLine("setAutostart");
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
}
}
}