<%args> $type => undef %#<& /service/open_form.mhtml &>

<% i18nGettext ('I18N_OPENXPKI_CLIENT_HTML_MASON_WORKFLOW_CREATE_INSTANCE_TITLE') %>

<% i18nGettext('I18N_OPENXPKI_CLIENT_HTML_MASON_WORKFLOW_CREATE_INSTANCE_DESCRIPTION') %>

% my $msg = $context->{client}->send_receive_command_msg ("list_workflow_titles"); % ## I expect the following: % ## SERVICE_MSG => "COMMAND", % ## COMMAND => $cmd, % ## PARAMS => {$name => {description => $desc}, ... } % %# %#<& /service/send_form.mhtml &> %#<& /service/close_form.mhtml &>
% % foreach my $type (keys %{$msg->{PARAMS}}) % { % next if (! grep {$_ eq $type} @optionless_workflows);
<% i18nGettext($type) %>
<% i18nGettext($msg->{PARAMS}->{$type}->{description}) %>
% }
<%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}) } }