JBoss Community

Re: I18NText with Oracle

created by Andrey Trakhirov in jBPM - View the full discussion

I have the same problem.

 

My temporary temporary solution:

 

public class HumanTaskWorkItemHandler extends AsyncGenericHTWorkItemHandler {

 

 

    public HumanTaskWorkItemHandler(KnowledgeRuntime session) {

        super(session);

    }

 

 

    @Override

    protected Task createTaskBasedOnWorkItemParams(WorkItem workItem) {

        Task task = super.createTaskBasedOnWorkItemParams(workItem);

        addDefaultDescriptionToText(task.getNames());

        addDefaultDescriptionToText(task.getSubjects());

        addDefaultDescriptionToText(task.getDescriptions());

        return task;

    }

 

 

    private void addDefaultDescriptionToText(List<I18NText> textList) {

        for(I18NText text: textList) {

            if (text.getText() == null || text.getText().equals("")) {

                text.setText(" ");

            }

        }

    }

}

Reply to this message by going to Community

Start a new discussion in jBPM at Community