Package pl.net.bluesoft.rnd.processtool.model.config

Examples of pl.net.bluesoft.rnd.processtool.model.config.ProcessStateConfiguration


        pi.setAssignees(assignees.toArray(new String[assignees.size()]));
        pi.setTaskQueues(queues.toArray(new String[queues.size()]));
    }

    private ProcessInstanceLog addActionLogEntry(ProcessStateAction action, BpmTask task, ProcessToolContext ctx) {
        ProcessStateConfiguration state = ctx.getProcessDefinitionDAO().getProcessStateConfiguration(task);

        ProcessInstanceLog log = new ProcessInstanceLog();
        if(AUTO_SKIP_ACTION_NAME.toLowerCase().equals(action.getBpmName().toLowerCase()))
          return log;
       
View Full Code Here


        }
      }
    }
    guiAction = null;

    final ProcessStateConfiguration stateConfiguration = ctx.getProcessDefinitionDAO()
                .getProcessStateConfiguration(task);

    Label stateDescription = new Label(getMessage(stateConfiguration.getDescription()));
    stateDescription.addStyleName("h1 color processtool-title");
        stateDescription.setWidth(100, Sizeable.UNITS_PERCENTAGE);

        addComponent(stateDescription);

    if (Strings.hasText(stateConfiguration.getCommentary())) {
      addComponent(new Label(getMessage(stateConfiguration.getCommentary()), Label.CONTENT_XHTML));
    }
        if (helpFactory != null)
        addComponent(helpFactory.helpIcon(task.getTaskName(), "step.help"));

    displayProcessContext.setCaption(task.getExternalProcessId() != null ? task.getExternalProcessId() : task.getInternalProcessId());

    final VerticalLayout vl = new VerticalLayout();
    vl.setSpacing(true);
    vl.setWidth(100, Sizeable.UNITS_PERCENTAGE);
        List<ProcessStateWidget> widgets = new ArrayList<ProcessStateWidget>(stateConfiguration.getWidgets());
        Collections.sort(widgets, new WidgetPriorityComparator());
       
       
        TaskWatch watch = new TaskWatch(ProcessDataPane.class.getSimpleName() + " - generowanie interfejsu dla kroku " + stateConfiguration.getName());

    final WidgetEventBus widgetEventBus = new WidgetEventBus();

    for (final ProcessStateWidget w : widgets) {
      try {
View Full Code Here

        List<BpmTask> taskList =
                new ArrayList<BpmTask>(bpmSession.findProcessTasks(pi,
                        ProcessToolContext.Util.getThreadProcessToolContext()));
        for (final BpmTask task : taskList) {
            vl.addComponent(getTaskStateComponent(pi, task));
            ProcessStateConfiguration cfg = ProcessToolContext.Util.getThreadProcessToolContext()
                    .getProcessDefinitionDAO().getProcessStateConfiguration(task);
            if (cfg != null && !cfg.getActions().isEmpty()) {
                vl.addComponent(new Label(getLocalizedMessage("processinstances.console.entry.available-actions")));
                HorizontalLayout hl = new HorizontalLayout();
                hl.setSpacing(true);
                List<ProcessStateAction> actions = new ArrayList<ProcessStateAction>(cfg.getActions());
                Collections.sort(actions, new Comparator<ProcessStateAction>() {
                    @Override
                    public int compare(ProcessStateAction o1, ProcessStateAction o2) {
                        int res = nvl(o1.getPriority(), 0).compareTo(nvl(o2.getPriority(), 0));
                        if (res == 0)
View Full Code Here

            }
        }
        //lookup process state configuration

        for (BpmTask t : nvl(processInstance.getActiveTasks(), new BpmTask[0])) {
            ProcessStateConfiguration psc
                    = new ProcessDefinitionDAOImpl(session).getProcessStateConfiguration(t);
            if (psc != null) {
                searchData.addSearchAttributes(new String[][]{
                                {"state_commentary", psc.getCommentary()},
                                {"state_description", psc.getDescription()},
                                {"state_name", psc.getName()},
                        });
                for (ProcessStatePermission perm : psc.getPermissions()) {
                    if ("SEARCH".equals(perm.getPrivilegeName())) {
                        String roleName = perm.getRoleName();
                        if (roleName.equals(".*"))
                            roleName = "__AWF__ROLE_ALL";
                        roleName = roleName.replace(' ', '_');
View Full Code Here

                String assigneeLogin = task.getAssignee();
        Map<String, UserData> notifyUsers = prepareUsersForNotification(ctx, assigneeLogin, processDeadline);

                // everything is good, unless it’s not
        I18NSource messageSource = getI18NSource();
                ProcessStateConfiguration st = ctx.getProcessDefinitionDAO().getProcessStateConfiguration(task);
                String taskName = messageSource.getMessage(st.getDescription());

                for (UserData user : notifyUsers.values()) {
                    if (processDeadline.getSkipAssignee() != null && processDeadline.getSkipAssignee() && user.getLogin().equals(assigneeLogin)) {
                        logger.info("Skipping deadline signal for assignee: " + assigneeLogin);
                        continue;
View Full Code Here

                    item.getItemProperty("def.desc").setValue(getMessage(pi.getDefinition().getDescription()));
                    item.getItemProperty("pi.externalKey").setValue(getExternalKey(pi));
                    item.getItemProperty("pi.internalId").setValue(pi.getInternalId());
                }

                ProcessStateConfiguration state = log.getState();
                if (state != null) {
                    item.getItemProperty("state.desc").setValue(getMessage(state.getDescription()));
                    item.getItemProperty("state.name").setValue(getMessage(state.getName()));
                }

                String authorName = log.getUser().getRealName();
                item.getItemProperty("log.author").setValue(authorName);
View Full Code Here

        VerticalLayout vl = new VerticalLayout();
        vl.setWidth("100%");
        vl.setSpacing(false);
        vl.setMargin(false);
        for (BpmTask task : tasks) {
            ProcessStateConfiguration state = ctx.getProcessDefinitionDAO().getProcessStateConfiguration(task);
            vl.addComponent(createTaskComponent(task, state));
        }
        return vl;
    }
View Full Code Here

    private VerticalLayout compositionRoot;

    public ProcessDataPreviewer() {

        //fake context initialization
        setContext(new ProcessStateConfiguration(),
                new ProcessStateWidget(), getDumbI18nSource(), null, getDumbApplication(),
                new HashSet<String>(Arrays.asList("EDIT")), true);
    }
View Full Code Here

TOP

Related Classes of pl.net.bluesoft.rnd.processtool.model.config.ProcessStateConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.