<%init>
# this is the list to filter the available workflows against.
# As it makes only sense to display workflows that have no options,
# show only the ones which you can create without input of data
my @optionless_workflows = qw(
I18N_OPENXPKI_WF_TYPE_CRL_ISSUANCE
);
if (defined $type)
{
my $msg = $context->{client}->send_receive_command_msg
(
"create_workflow_instance",
{"WORKFLOW" => $type}
);
if (exists $msg->{SERVICE_MSG} and
$msg->{SERVICE_MSG} eq "ERROR")
{
my $errors = [ $m->comp ('/lib/get_deep_error.mhtml', 'msg' => $msg) ];
return $m->comp ('/service/create_csr/print_errors.mhtml', 'errors' => $errors);
} else {
return $m->comp ('/service/workflow/show_instance.html', 'id' => $msg->{PARAMS}->{WORKFLOW}->{ID})
}
}
%init>