Search in sources :

Example 21 with ReassignmentValue

use of org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue in project kie-wb-common by kiegroup.

the class ReassignmentValueValidatorTest method test10DigExpiresAtReassignmentValue.

@Test
public void test10DigExpiresAtReassignmentValue() {
    ReassignmentValue value = new ReassignmentValue();
    value.setDuration("1111111111d");
    boolean result = validator.isValid(value, context);
    assertTrue(result);
}
Also used : ReassignmentValue(org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue) Test(org.junit.Test)

Example 22 with ReassignmentValue

use of org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue in project kie-wb-common by kiegroup.

the class ReassignmentWidget method ok.

@Override
public void ok() {
    if (callback != null) {
        List<ReassignmentValue> reassignments = getValue().stream().map(row -> row.toReassignmentValue()).collect(Collectors.toList());
        callback.getData(new ReassignmentTypeListValue(reassignments));
    }
    view.hide();
}
Also used : ValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler) ValueChangeEvent(com.google.gwt.event.logical.shared.ValueChangeEvent) StunnerBPMNConstants(org.kie.workbench.common.stunner.bpmn.client.forms.fields.i18n.StunnerBPMNConstants) ReassignmentsEditorWidget(org.kie.workbench.common.stunner.bpmn.client.forms.fields.reassignmentsEditor.ReassignmentsEditorWidget) Collectors(java.util.stream.Collectors) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) HandlerRegistration(com.google.gwt.event.shared.HandlerRegistration) ClientTranslationService(org.kie.workbench.common.stunner.core.client.i18n.ClientTranslationService) List(java.util.List) Widget(com.google.gwt.user.client.ui.Widget) Dependent(javax.enterprise.context.Dependent) ReassignmentTypeListValue(org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentTypeListValue) ReassignmentRow(org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.ReassignmentRow) GwtEvent(com.google.gwt.event.shared.GwtEvent) IsWidget(com.google.gwt.user.client.ui.IsWidget) ReassignmentValue(org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue) ReassignmentValue(org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue) ReassignmentTypeListValue(org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentTypeListValue)

Aggregations

ReassignmentValue (org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentValue)22 Test (org.junit.Test)17 ArrayList (java.util.ArrayList)4 ValueChangeEvent (com.google.gwt.event.logical.shared.ValueChangeEvent)1 ValueChangeHandler (com.google.gwt.event.logical.shared.ValueChangeHandler)1 GwtEvent (com.google.gwt.event.shared.GwtEvent)1 HandlerRegistration (com.google.gwt.event.shared.HandlerRegistration)1 IsWidget (com.google.gwt.user.client.ui.IsWidget)1 Widget (com.google.gwt.user.client.ui.Widget)1 HTMLInputElement (elemental2.dom.HTMLInputElement)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 Dependent (javax.enterprise.context.Dependent)1 Inject (javax.inject.Inject)1 StunnerBPMNConstants (org.kie.workbench.common.stunner.bpmn.client.forms.fields.i18n.StunnerBPMNConstants)1 ReassignmentRow (org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.ReassignmentRow)1 ReassignmentsEditorWidget (org.kie.workbench.common.stunner.bpmn.client.forms.fields.reassignmentsEditor.ReassignmentsEditorWidget)1 ReflectionUtilsTest (org.kie.workbench.common.stunner.bpmn.client.forms.util.ReflectionUtilsTest)1 UserTask (org.kie.workbench.common.stunner.bpmn.definition.UserTask)1 ReassignmentTypeListValue (org.kie.workbench.common.stunner.bpmn.definition.property.reassignment.ReassignmentTypeListValue)1