Use this code sample to get credentials from the Cora SeQuence credential store. The code runs from within a custom assembly or custom activity.
IWorkflowEngine engine =ActivityExecutionContext.Current.WorkflowInstance.Engine;
IServiceProvider svc = engine.GetService<IServiceProvider>();
PNMsoft.Sequence.Security.CredentialDefinition c;
c= PNMsoft.Sequence.Security.CredentialDefinition.GetCredential(svc,"name");