Replacing the Mobile Workflow Certificate Using the Admin API

Use the SUPMobileWorkflow.replaceMobileWorkflowCertificate() method to set or modify the certificate password context variable for the workflow package.

InputStream is = workflowRL.getResourceAsStream("sybase101.p12");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buf = new byte[512];
int count;
while ((count = is.read(buf)) != -1) {
	baos.write(buf, 0, count);
}
is.close();
baos.flush();
baos.close();			
MobileWorkflowIDVO workflowID = new MobileWorkflowIDVO();
workflowID.setWID(4);
workflowID.setVersion(1);

workflow.replaceMobileWorkflowCertificate(workflowID,
	baos.toByteArray(), "password");