4 %#<& /service/open_form.mhtml &
>
5 <h1><%
i18nGettext ('I18N_OPENXPKI_CLIENT_HTML_MASON_WORKFLOW_CREATE_INSTANCE_TITLE') %></h1>
7 <%
i18nGettext('I18N_OPENXPKI_CLIENT_HTML_MASON_WORKFLOW_CREATE_INSTANCE_DESCRIPTION') %>
9 % my $msg = $context-
>{client}-
>send_receive_command_msg (
"list_workflow_titles");
10 % ## I expect the following:
11 % ## SERVICE_MSG =
> "COMMAND",
13 % ## PARAMS =
> {$name =
> {description =
> $desc}, ... }
15 %#
<select name=
"type">
16 %# foreach my $type (keys %{$msg-
>{PARAMS}})
18 %#
<option value=
"<% $type %>">
19 %#
<% i18nGettext($type
) %>
23 %#<& /service/send_form.mhtml &
>
24 %#<& /service/close_form.mhtml &
>
27 % foreach my $type (keys %{$msg-
>{PARAMS}})
29 % next if (! grep {$_ eq $type} @optionless_workflows);
31 <a href=
"create_instance.html?<% $context->{menu}->get_link_params() %>;type=<% $type %>">
32 <% i18nGettext($type
) %>
35 <dd><%
i18nGettext($msg
->{PARAMS
}->{$type
}->{description
}) %></dd>
40 #
this is the list to filter the available workflows against
.
41 # As it makes only sense to display workflows that have no options
,
42 # show only the ones which you can create without input of data
43 my
@optionless_workflows = qw(
44 I18N_OPENXPKI_WF_TYPE_CRL_ISSUANCE
48 my $msg
= $context
->{client
}->send_receive_command_msg
50 "create_workflow_instance",
53 if (exists $msg
->{SERVICE_MSG
} and
54 $msg
->{SERVICE_MSG
} eq
"ERROR")
56 my $errors
= [ $m
->comp ('/lib/get_deep_error.mhtml', 'msg' => $msg
) ];
57 return $m
->comp ('/service/create_csr/print_errors.mhtml', 'errors' => $errors
);
59 return $m
->comp ('/service/workflow/show_instance.html', 'id' => $msg
->{PARAMS
}->{WORKFLOW
}->{ID
})