...
 
Commits (2)
......@@ -33,10 +33,9 @@ incompatibleJavaVersionMessage=You are running %s using an incompatible Java ver
exitWarningMessage=Salir {0} ? \n\nCerrar el Studio eliminar\u00e1 el trabajo no guardado en el {1} y en el {2}. Aseg\u00farese de haber salvado cualquier elemento abierto en el {2} y exportar sus recursos personalizados del {1}. \n\nNota\: En <A>Preferencias > Base de Datos</A>, usted puede desmarcar la opci\u00f3n "Limpiar base de datos al salir" para mantener el contenido de su base de datos.
doNotShowMeAgain=No volver a mostrar este cuadro de di\u00e1logo
startDialogTitle=Bienvenido a Bonita Studio %s
startDialogMsg=\u2022Muchos nuevos valores en este Bonita. Le recomendamos encarecidamente que lea el <a>%s</a>.\n\n\u2022 Si est\u00e1 actualizando desde una versi\u00f3n anterior, es posible que desee importar su trabajo desde un \u00e1rea de trabajo existente.
startDialogDetails=puede importar un espacio de trabajo existente, con el siguiente men\u00fa del Studio\: Archivo > Importar > Espacio de trabajo
startDialogMsg=\u2022 Many new values in this Bonita. We strongly advise you to read the <a>%s</a>.\n\n\u2022 If you are upgrading from a previous version you may want to import your work using BOS Archives.
startDialogDetails=you can import a BOS Archive using the following menu from the Studio\:\nFile > Import > Import BOS archive
releaseNote=notas de la versi\u00f3n
importWorkspace=Importar un espacio de trabajo
_6xFormsDontWorkAnymore=Los formularios 6.x basados en la tecnolog\u00eda Google Web Toolkit (GWT) ya no est\u00e1n soportados
letsStart=\u00a1Comencemos\!
NewButtonLabel=Nuevo
......
......@@ -33,10 +33,9 @@ incompatibleJavaVersionMessage=You are running %s using an incompatible Java ver
exitWarningMessage=Quitter {0} ? \n\nLa fermeture de Bonita BPM Studio supprime les informations non enregistr\u00e9es dans le {1} et le {2}. Enregistrez tous les \u00e9l\u00e9ments ouverts dans le {2} et exportez vos ressources et applications d\u00e9ploy\u00e9es dans le {1} avant de quitter. \n\nNote \: Dans <A>Pr\u00e9f\u00e9rences > Bases de donn\u00e9es</A>, vous pouvez d\u00e9cocher l''option \u00ab Vider la base de donn\u00e9es \u00e0 la fermeture \u00bb pour conserver ce contenu.
doNotShowMeAgain=Ne plus afficher ce dialogue
startDialogTitle=Bienvenue dans Bonita Studio %s
startDialogMsg=\u2022 Beaucoup de nouvelles valeurs dans cette nouvelle version de Bonita. Nous vous conseillons vivement de lire les <a>%s</a>.\n\n\u2022 Si cette installation est une mise \u00e0 jour, vous pouvez importer votre travail \u00e0 partir d\u2019un espace de travail existant.
startDialogDetails=vous pourrez importer un espace de travail existant plus tard, en utilisant le menu du Studio\u00a0"Fichier > Importer > Workspace"
startDialogMsg=\u2022 Many new values in this Bonita. We strongly advise you to read the <a>%s</a>.\n\n\u2022 If you are upgrading from a previous version you may want to import your work using BOS Archives.
startDialogDetails=you can import a BOS Archive using the following menu from the Studio\:\nFile > Import > Import BOS archive
releaseNote=notes de version
importWorkspace=Importer un workspace
_6xFormsDontWorkAnymore=Les formulaires datant de Bonita 6.x, bas\u00e9s sur la technologie Google Web Toolkit (GWT), ne sont plus support\u00e9s
letsStart=C'est parti \!
NewButtonLabel=Nouveau
......
......@@ -33,10 +33,9 @@ incompatibleJavaVersionMessage=You are running %s using an incompatible Java ver
exitWarningMessage={0} \u3092\u7d42\u4e86\u3057\u307e\u3059\u304b\uff1f\n\nStudio\u3092\u9589\u3058\u308b\u3068\u3001{1} \u3068 {2} \u306e\u672a\u4fdd\u5b58\u306e\u4f5c\u696d\u7d50\u679c\u304c\u524a\u9664\u3055\u308c\u307e\u3059\u3002\u5fc5\u305a\u3001{2} \u3067\u958b\u304b\u308c\u305f\u8981\u7d20\u3092\u4fdd\u5b58\u3057\u3001{1} \u304b\u3089\u30ab\u30b9\u30bf\u30e0 \u30ea\u30bd\u30fc\u30b9\u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\n \u6ce8\uff1a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 \u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4fdd\u6301\u3059\u308b\u305f\u3081\u306b\u306f\u3001 <A>\u74b0\u5883\u8a2d\u5b9a > \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9</A>\u3067\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u300c\u7d42\u4e86\u6642\u306bBPM \u30a8\u30f3\u30b8\u30f3\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 \u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u6d88\u53bb\u3059\u308b\u300d\u3092\u30aa\u30d5\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
doNotShowMeAgain=\u4eca\u5f8c\u3001\u3053\u306e\u30c0\u30a4\u30a2\u30ed\u30b0\u306f\u8868\u793a\u3057\u306a\u3044
startDialogTitle=Welcome to Bonita Studio %s
startDialogMsg=\u2022 Many new values in this Bonita. We strongly advise you to read the <a>%s</a>.\n\n\u2022 If you are upgrading from a previous version you may want to import your work from an existing workspace.
startDialogDetails=Studio \u304b\u3089\u6b21\u306e\u30e1\u30cb\u30e5\u30fc\u3092\u4f7f\u7528\u3057\u3066\u3001\u5f8c\u3067\u65e2\u5b58\u306e\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3067\u304d\u307e\u3059\uff1a \n\u30d5\u30a1\u30a4\u30eb > \u30a4\u30f3\u30dd\u30fc\u30c8 > \u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9
startDialogMsg=\u2022 Many new values in this Bonita. We strongly advise you to read the <a>%s</a>.\n\n\u2022 If you are upgrading from a previous version you may want to import your work using BOS Archives.
startDialogDetails=you can import a BOS Archive using the following menu from the Studio\:\nFile > Import > Import BOS archive
releaseNote=release notes
importWorkspace=\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9\u3092\u30a4\u30f3\u30dd\u30fc\u30c8
_6xFormsDontWorkAnymore=6.x forms based on Google Web Toolkit (GWT) technology are not supported anymore
letsStart=Let's start \!
NewButtonLabel=\u65b0\u898f
......
......@@ -33,10 +33,9 @@ incompatibleJavaVersionMessage=You are running %s using an incompatible Java ver
exitWarningMessage=Sair {0}? \n\nAo fechar o Studio, todo trabalho n\u00e3o salvo em {1} e {2} ser\u00e1 perdido. Salve todos os elementos abertos em {2} e exporte os recursos e aplica\u00e7\u00f5es em {1} antes de sair. \n\nNota\: Em <A>Prefer\u00eancias > Banco de dados</A>, \u00e9 poss\u00edvel desmarcar a op\u00e7\u00e3o "Limpar banco de dados na sa\u00edda" para manter o conte\u00fado do banco de dados.
doNotShowMeAgain=Do not show me this dialog again
startDialogTitle=Welcome to Bonita Studio %s
startDialogMsg=\u2022 Many new values in this Bonita. We strongly advise you to read the <a>%s</a>.\n\n\u2022 If you are upgrading from a previous version you may want to import your work from an existing workspace.
startDialogDetails=you can import an existing workspace later, using the following menu from the Studio\:\nFile > Import > Workspace
startDialogMsg=\u2022 Many new values in this Bonita. We strongly advise you to read the <a>%s</a>.\n\n\u2022 If you are upgrading from a previous version you may want to import your work using BOS Archives.
startDialogDetails=you can import a BOS Archive using the following menu from the Studio\:\nFile > Import > Import BOS archive
releaseNote=release notes
importWorkspace=Import a workspace
_6xFormsDontWorkAnymore=6.x forms based on Google Web Toolkit (GWT) technology are not supported anymore
letsStart=Let's start \!
NewButtonLabel=Nova
......
......@@ -98,4 +98,5 @@ creatingMappingOperation=Creando la operaci\u00f3n de mapeo para %s
saving=Guardando...
taskBdmTips=Primero defina <a>las variables de negocio</a> y/o<a>los documentos</a> y luego haga clic en "Agregar datos...". Autom\u00e1ticamente se mapen las entradas de contrato a los datos y se crean operaciones para actualizar datos con valores de contrato.
poolBdmTips=Primero defina <a>las variables de negocio</a> y/o<a>los documentos</a> y luego haga clic en "Agregar datos...". Autom\u00e1ticamente se mapean las entradas de contrato a los datos y se crean operaciones para actualizar datos con valores de contrato.
creatingNewForm=Creating new form...
......@@ -98,4 +98,5 @@ creatingMappingOperation=Cr\u00e9ation des op\u00e9ration de mapping pour %s
saving=Enregistrement en cours...
taskBdmTips=Il est conseill\u00e9 de d'abord d\u00e9finir des <a>variables m\u00e9tier</a> et/ou des <a>documents</a> puis de cliquer sur \u00ab\u00a0Ajouter \u00e0 partir de donn\u00e9es...\u00a0\u00bb.\nCette fonction cr\u00e9era automatiquement le mapping entre inputs de contrat et donn\u00e9es. Elle cr\u00e9era aussi les op\u00e9rations de mise \u00e0 jour des donn\u00e9es avec les valeurs du contrat.
poolBdmTips=Il est conseill\u00e9 de d'abord d\u00e9finir des <a>variables m\u00e9tier</a> et/ou des <a>documents</a> puis de cliquer sur \u00ab\u00a0Ajouter \u00e0 partir de donn\u00e9es...\u00a0\u00bb.\nCette fonction cr\u00e9era automatiquement le mapping entre inputs de contrat et donn\u00e9es. Elle initialisera aussi les donn\u00e9es avec les valeurs du contrat.
creatingNewForm=Creating new form...
......@@ -98,4 +98,5 @@ creatingMappingOperation=%s \u306e\u30de\u30c3\u30d4\u30f3\u30b0\u64cd\u4f5c\u30
saving=\u4fdd\u5b58\u4e2d...
taskBdmTips=\u6700\u521d\u306b<a>\u30d3\u30b8\u30cd\u30b9\u5909\u6570</a>\u3001\u304a\u3088\u3073/\u307e\u305f\u306f<a>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8</a>\u3092\u5b9a\u7fa9\u3057\u3001\u300c\u30c7\u30fc\u30bf\u304b\u3089\u8ffd\u52a0...\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002\n\u5165\u529b\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u81ea\u52d5\u7684\u306b\u30c7\u30fc\u30bf\u306b\u30de\u30c3\u30d7\u3055\u308c\u308b\u306e\u3067\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5024\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\u3059\u308b\u64cd\u4f5c\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002
poolBdmTips=\u6700\u521d\u306b<a>\u30d3\u30b8\u30cd\u30b9\u5909\u6570</a>\u3001\u304a\u3088\u3073/\u307e\u305f\u306f<a>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8</a>\u3092\u5b9a\u7fa9\u3057\u3001\u300c\u30c7\u30fc\u30bf\u304b\u3089\u8ffd\u52a0...\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002\n\u5165\u529b\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u81ea\u52d5\u7684\u306b\u30c7\u30fc\u30bf\u306b\u30de\u30c3\u30d7\u3055\u308c\u308b\u306e\u3067\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5024\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u3092\u521d\u671f\u5316\u3057\u307e\u3059\u3002
creatingNewForm=Creating new form...
......@@ -98,4 +98,5 @@ creatingMappingOperation=Creating mapping operation for %s
saving=Saving...
taskBdmTips=You can first define <a>business variables</a> and/or <a>documents</a>, and then click on "Add from data...".\nIt will automatically map contract inputs to data, and create operations to update data with contract values.
poolBdmTips=You can first define <a>business variables</a> and/or <a>documents</a>, and then click on "Add from data...".\nIt will automatically map contract inputs to data, and initialize data with contract values.
creatingNewForm=Creating new form...
......@@ -5,12 +5,10 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.0 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
......@@ -19,6 +17,7 @@ package org.bonitasoft.studio.contract.core.operation;
import static com.google.common.base.Predicates.instanceOf;
import static com.google.common.collect.Iterables.all;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.tuple;
import static org.bonitasoft.studio.model.process.builders.ContractBuilder.aContract;
import static org.bonitasoft.studio.model.process.builders.ContractInputBuilder.aContractInput;
......@@ -150,9 +149,11 @@ public class ToWebContractTest {
final ToWebContract contractConverter = new ToWebContract();
final Contract contract = contractConverter.apply(aContract()
.havingInput(aContractInput().withType(ContractInputType.FILE)).build());
.havingInput(aContractInput().withType(ContractInputType.FILE).withDataReference("myDocument")).build());
assertThat(contract.getInput()).extracting("type").containsExactly(File.class.getName());
assertThat(contract.getInput()).extracting("dataReference.name", "dataReference.type")
.containsExactly(tuple("myDocument", File.class.getName()));
}
@Test
......@@ -189,4 +190,3 @@ public class ToWebContractTest {
assertThat(contract.getInput()).extracting("type").containsExactly(Long.class.getName());
}
}
......@@ -374,6 +374,34 @@ public class ContractInputGenerationWizardTest {
assertThat(wizard.canFinish()).isTrue();
}
@Test
public void should_add_data_reference_for_document_only_on_task() {
Task task = aTask().havingContract(aContract()).build();
Pool process = aPool().havingContract(aContract()).build();
Document document1 = ProcessFactory.eINSTANCE.createDocument();
document1.setName("myDocument");
process.getDocuments().add(document1);
process.getElements().add(task);
ContractInputGenerationWizard wizard = new ContractInputGenerationWizard(process, editingDomain(),
repositoryAccessor, operationBuilder,
expressionBuilder,
preferenceStore, sharedImages, dialogFactory, new ContractInputGenerationWizardPagesFactory(),
sourceViewerFactory);
wizard.addPages();
assertThat(wizard.createDocumentContractInput(document1).getDataReference()).isNull();
wizard = new ContractInputGenerationWizard(task, editingDomain(),
repositoryAccessor, operationBuilder,
expressionBuilder,
preferenceStore, sharedImages, dialogFactory, new ContractInputGenerationWizardPagesFactory(),
sourceViewerFactory);
wizard.addPages();
assertThat(wizard.createDocumentContractInput(document1).getDataReference()).isEqualTo("myDocument");
}
private EditingDomain editingDomain() {
return new TransactionalEditingDomainImpl(new ProcessItemProviderAdapterFactory());
}
......
......@@ -21,9 +21,9 @@ import org.bonitasoft.studio.contract.core.mapping.SimpleFieldToContractInputMap
import org.bonitasoft.studio.model.process.BusinessObjectData;
import org.bonitasoft.studio.model.process.ContractInput;
import org.bonitasoft.studio.model.process.ContractInputType;
import org.bonitasoft.web.designer.model.contract.DataReference;
import org.bonitasoft.web.designer.model.contract.DataReference.LoadingType;
import org.bonitasoft.web.designer.model.contract.DataReference.RelationType;
import org.bonitasoft.web.designer.model.contract.BusinessDataReference;
import org.bonitasoft.web.designer.model.contract.BusinessDataReference.LoadingType;
import org.bonitasoft.web.designer.model.contract.BusinessDataReference.RelationType;
public class TreeBuilder {
......@@ -39,7 +39,7 @@ public class TreeBuilder {
.orElseThrow(() -> new IllegalStateException(
String.format("No Business Object found with type %s", data.getClassName())));
TreeNode node = new TreeNode(input,
new DataReference(data.getName(), data.getClassName(), RelationType.COMPOSITION, LoadingType.EAGER));
new BusinessDataReference(data.getName(), data.getClassName(), RelationType.COMPOSITION, LoadingType.EAGER));
buildTree(bo, input, node);
return node;
}
......@@ -62,7 +62,7 @@ public class TreeBuilder {
.ifPresent(field -> {
RelationField relationField = (RelationField) field;
BusinessObject businessObject = relationField.getReference();
TreeNode newNode = node.addNode(childInput, new DataReference(relationField.getName(),
TreeNode newNode = node.addNode(childInput, new BusinessDataReference(relationField.getName(),
businessObject.getQualifiedName(),
toRelationType(relationField),
toLoadingType(relationField)));
......
......@@ -26,10 +26,12 @@ import java.util.Date;
import org.bonitasoft.studio.contract.core.mapping.treeMaching.TreeResult;
import org.bonitasoft.studio.model.process.Contract;
import org.bonitasoft.studio.model.process.ContractInput;
import org.bonitasoft.web.designer.model.contract.DataReference;
import org.bonitasoft.web.designer.model.contract.LeafContractInput;
import org.bonitasoft.web.designer.model.contract.NodeContractInput;
import com.google.common.base.Function;
import com.google.common.base.Strings;
public class ToWebContract implements Function<Contract, org.bonitasoft.web.designer.model.contract.Contract> {
......@@ -75,7 +77,7 @@ public class ToWebContract implements Function<Contract, org.bonitasoft.web.desi
case BOOLEAN:
return createLeafContractInput(input, Boolean.class);
case FILE:
return createLeafContractInput(input, File.class);
return createDocumentLeafContractInput(input);
case COMPLEX:
return createNodeContractInput(input);
default:
......@@ -90,11 +92,22 @@ public class ToWebContract implements Function<Contract, org.bonitasoft.web.desi
return copyInputProperties(input, new LeafContractInput(input.getName(), type));
}
private org.bonitasoft.web.designer.model.contract.ContractInput createDocumentLeafContractInput(
final ContractInput input) {
org.bonitasoft.web.designer.model.contract.ContractInput leafContractInput = createLeafContractInput(input,
File.class);
if (!Strings.isNullOrEmpty(input.getDataReference())) {
((LeafContractInput) leafContractInput)
.setDataReference(new DataReference(input.getDataReference(), File.class.getName()));
}
return leafContractInput;
}
private org.bonitasoft.web.designer.model.contract.ContractInput copyInputProperties(final ContractInput input,
final org.bonitasoft.web.designer.model.contract.ContractInput contractInput) {
contractInput.setMultiple(input.isMultiple());
contractInput.setDescription(input.getDescription());
if(contractInput instanceof NodeContractInput) {
if (contractInput instanceof NodeContractInput) {
((NodeContractInput) contractInput).setDataReference(treeResult.getDataReference(input));
}
return contractInput;
......
......@@ -252,18 +252,11 @@ public class ContractInputGenerationWizard extends Wizard {
return true;
}
private IRunnableWithProgress buildContractOperationFromDocument(final Document document) {
return new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
private IRunnableWithProgress buildContractOperationFromDocument(Document document) {
return monitor -> {
monitor.beginTask("", IProgressMonitor.UNKNOWN);
final ContractInput input = ProcessFactory.eINSTANCE.createContractInput();
input.setType(ContractInputType.FILE);
input.setMultiple(document.isMultiple());
input.setName(selectBusinessDataWizardPage.getRootName());
input.setDataReference(document.getName());
final CompoundCommand cc = new CompoundCommand();
ContractInput input = createDocumentContractInput(document);
CompoundCommand cc = new CompoundCommand();
cc.append(AddCommand.create(editingDomain, contractContainer.getContract(),
ProcessPackage.Literals.CONTRACT__INPUTS,
input));
......@@ -277,10 +270,20 @@ public class ContractInputGenerationWizard extends Wizard {
input));
}
editingDomain.getCommandStack().execute(cc);
}
};
}
protected ContractInput createDocumentContractInput(Document document) {
ContractInput input = ProcessFactory.eINSTANCE.createContractInput();
input.setType(ContractInputType.FILE);
input.setMultiple(document.isMultiple());
input.setName(selectBusinessDataWizardPage.getRootName());
if (contractContainer instanceof Task) {
input.setDataReference(document.getName());
}
return input;
}
private void createDocumentUpdateOperation(final Document document, final ContractInput input,
final CompoundCommand cc) {
final Operation operation = ExpressionFactory.eINSTANCE.createOperation();
......
......@@ -14,7 +14,7 @@
<tychoExtrasVersion>1.3.0</tychoExtrasVersion>
<os-jvm-flags></os-jvm-flags>
<bundle.version>${project.version}</bundle.version>
<ui.designer.version>1.9.14</ui.designer.version>
<ui.designer.version>1.9.15</ui.designer.version>
<engine.version>${project.version}</engine.version>
<filters.version>${project.version}</filters.version>
<platform.version>${project.parent.version}</platform.version>
......