Deployment issue in Fabric for code using camel-cxf and camel-http - jbossfuse

I am getting the following error while trying to deploy the test-ext feature of the test-ext-profile in JBoss Fuse Fabric. The other feature ticktock of the same profile is getting deployed alright and working fine. I am trying to deploy the two profiles in the child container by typing the command - "container-change-profile test-child-container-1 feature-camel test-ext-profile". PLEASE HELP.
----------------------------------------------------------------------------------------
ERROR --
-------------------------------------------------------------------------------------------------
2015-01-05 16:06:47,125 | INFO | admin-4-thread-1 | FabricConfigAdminBridge | figadmin.FabricConfigAdminBridge 173 | 67 - io.fabric8.fabric-configadmin - 1.0.0.redhat-379 | Updating configuration io.fabric8.agent
2015-01-05 16:06:47,140 | INFO | admin-4-thread-1 | FabricConfigAdminBridge | figadmin.FabricConfigAdminBridge 142 | 67 - io.fabric8.fabric-configadmin - 1.0.0.redhat-379 | Deleting configuration org.ops4j.pax.logging
2015-01-05 16:06:47,140 | INFO | o.fabric8.agent) | DeploymentAgent | io.fabric8.agent.DeploymentAgent 243 | 60 - io.fabric8.fabric-agent - 1.0.0.redhat-379 | DeploymentAgent updated with {hash=ProfileImpl[id='default', version='1.0']-, org.ops4j.pax.url.mvn.defaultrepositories=file:C:\manish\Work - Consulting\installers\jboss-fuse-6.1.0.redhat-379/system#snapshots#id=karaf-default,file:C:\manish\Work - Consulting\installers\jboss-fuse-6.1.0.redhat-379/local-repo#snapshots#id=karaf-local, feature.karaf=karaf, feature.jolokia=jolokia, resolve.optional.imports=false, feature.fabric-core=fabric-core, fabric.zookeeper.pid=io.fabric8.agent, org.ops4j.pax.url.mvn.repositories=http://repo1.maven.org/maven2#id=central, https://repo.fusesource.com/nexus/content/groups/public#id=fusepublic, https://repository.jboss.org/nexus/content/repositories/public#id=jbosspublic, https://repo.fusesource.com/nexus/content/repositories/releases#id=jbossreleases, https://repo.fusesource.com/nexus/content/groups/ea#id=jbossearlyaccess, http://repository.springsource.com/maven/bundles/release#id=ebrreleases, http://repository.springsource.com/maven/bundles/external#id=ebrexternal, https://oss.sonatype.org/content/groups/scala-tools#id=scala, repository.fabric8=mvn:io.fabric8/fabric8-karaf/1.0.0.redhat-379/xml/features, patch.repositories=https://repo.fusesource.com/nexus/content/repositories/releases, https://repo.fusesource.com/nexus/content/groups/ea, service.pid=io.fabric8.agent, feature.fabric-jaas=fabric-jaas, feature.fabric-agent=fabric-agent, feature.fabric-web=fabric-web, feature.fabric-git-server=fabric-git-server, feature.fabric-git=fabric-git, repository.karaf-standard=mvn:org.apache.karaf.assemblies.features/standard/2.3.0.redhat-610379/xml/features, optional.ops4j-base-lang=mvn:org.ops4j.base/ops4j-base-lang/1.4.0}
2015-01-05 16:07:12,344 | INFO | o.fabric8.agent) | DeploymentAgent | io.fabric8.agent.DeploymentAgent 243 | 60 - io.fabric8.fabric-agent - 1.0.0.redhat-379 | DeploymentAgent updated with {feature.ticktock=ticktock, hash=ProfileImpl[id='test-ext-profile', version='1.0']----, org.ops4j.pax.url.mvn.defaultrepositories=file:C:\manish\Work - Consulting\installers\jboss-fuse-6.1.0.redhat-379/system#snapshots#id=karaf-default,file:C:\manish\Work - Consulting\installers\jboss-fuse-6.1.0.redhat-379/local-repo#snapshots#id=karaf-local, feature.karaf=karaf, repository.file:c:_goutam_osgitest2_unsolr_features.xml=file:C:/manish/osgitest2/testsolr/features.xml, feature.jolokia=jolokia, repository.karaf-spring=mvn:org.apache.karaf.assemblies.features/spring/2.3.0.redhat-610379/xml/features, feature.camel-blueprint=camel-blueprint, resolve.optional.imports=false, feature.camel-core=camel-core, feature.test-ext=test-ext, feature.camel-cxf_0.0.0=camel-cxf/0.0.0, feature.fabric-core=fabric-core, repository.karaf-enterprise=mvn:org.apache.karaf.assemblies.features/enterprise/2.3.0.redhat-610379/xml/features, fabric.zookeeper.pid=io.fabric8.agent, feature.fabric-camel=fabric-camel, org.ops4j.pax.url.mvn.repositories=http://repo1.maven.org/maven2#id=central, https://repo.fusesource.com/nexus/content/groups/public#id=fusepublic, https://repository.jboss.org/nexus/content/repositories/public#id=jbosspublic, https://repo.fusesource.com/nexus/content/repositories/releases#id=jbossreleases, https://repo.fusesource.com/nexus/content/groups/ea#id=jbossearlyaccess, http://repository.springsource.com/maven/bundles/release#id=ebrreleases, http://repository.springsource.com/maven/bundles/external#id=ebrexternal, https://oss.sonatype.org/content/groups/scala-tools#id=scala, repository.fabric8=mvn:io.fabric8/fabric8-karaf/1.0.0.redhat-379/xml/features, feature.fabric-jaas=fabric-jaas, patch.repositories=https://repo.fusesource.com/nexus/content/repositories/releases, https://repo.fusesource.com/nexus/content/groups/ea, service.pid=io.fabric8.agent, feature.fabric-agent=fabric-agent, feature.fabric-web=fabric-web, feature.fabric-git-server=fabric-git-server, feature.camel-http_0.0.0=camel-http/0.0.0, feature.fabric-git=fabric-git, repository.apache-camel=mvn:org.apache.camel.karaf/apache-camel/2.12.0.redhat-610379/xml/features, repository.karaf-standard=mvn:org.apache.karaf.assemblies.features/standard/2.3.0.redhat-610379/xml/features, optional.ops4j-base-lang=mvn:org.ops4j.base/ops4j-base-lang/1.4.0, attribute.parents=feature-camel}
2015-01-05 16:07:13,141 | ERROR | agent-1-thread-1 | DeploymentAgent | .fabric8.agent.DeploymentAgent$2 255 | 60 - io.fabric8.fabric-agent - 1.0.0.redhat-379 | Unable to update agent
org.osgi.service.resolver.ResolutionException: Unable to resolve dummy/0.0.0: missing requirement [dummy/0.0.0] osgi.identity; osgi.identity=test-ext; type=karaf.feature; version=0
at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:285)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
at org.apache.felix.resolver.Candidates.populate(Candidates.java:153)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:148)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
at io.fabric8.agent.DeploymentBuilder.resolve(DeploymentBuilder.java:226)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
at io.fabric8.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:521)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
at io.fabric8.agent.DeploymentAgent$2.run(DeploymentAgent.java:252)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_71]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_71]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_71]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_71]
-------------------------------------------------------------------------------------------------
THE PROFILE DISPLAY DETAILS ARE AS FOLLOWS -
-------------------------------------------------------------------------------------------------
JBossFuse:karaf#root> profile-display test-ext-profile
Profile id: test-ext-profile
Version : 1.0
Attributes:
parents: feature-camel
Containers: test-child-container-1
Container settings
----------------------------
Repositories :
file:C:/manish/osgitest2/testsolr/features.xml
Features :
camel-http/0.0.0
camel-cxf/0.0.0
test-ext
ticktock
Configuration details
----------------------------
Other resources
----------------------------
-------------------------------------------------------------------------------------------------
THE features.xml LOOKS LIKE THIS -
-------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<features name="my-features">
<feature name="ticktock">
<bundle>file:C:/manish/osgitest2/testsolr/osgitest_tick2.jar</bundle>
<bundle>file:C:/manish/osgitest2/testsolr/osgitest_tock2.jar</bundle>
</feature>
<feature name="test-ext">
<bundle>file:C:/manish/osgitest2/testsolr/standard-ext-api-1.0.0-SNAPSHOT.jar</bundle>
</feature>
</features>
-------------------------------------------------------------------------------------------------
MANIFEST.MF of standard-ext-api-1.0.0-SNAPSHOT.jar is as below. This jar uses camel-cxf and camel-http.
-------------------------------------------------------------------------------------------------
Manifest-Version: 1.0
Bnd-LastModified: 1420491685490
Build-Jdk: 1.7.0_71
Built-By: manish
Bundle-ManifestVersion: 2
Bundle-Name: Camel Blueprint Route for test ext Query
Bundle-SymbolicName: standard-ext-api
Bundle-Version: 1.0.0.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Export-Package: org.apache.cxf;uses:="org.apache.cxf.feature,org.apache.
cxf.interceptor,org.apache.cxf.common.i18n,org.apache.cxf.common.loggin
g,org.apache.cxf.common.util,org.apache.cxf.common.classloader";version
="2.7.0.redhat-610379"
Import-Package: javax.ws.rs;version="[2.0,3)",javax.ws.rs.core;version="
[2.0,3)",javax.xml.bind.annotation,org.apache.camel;version="[2.12,3)",
org.apache.camel.builder;version="[2.12,3)",org.apache.camel.model;vers
ion="[2.12,3)",org.apache.camel.processor.aggregate;version="[2.12,3)",
org.apache.cxf.common.classloader;version="[2.7,3)",org.apache.cxf.comm
on.i18n;version="[2.7,3)",org.apache.cxf.common.logging;version="[2.7,3
)",org.apache.cxf.common.util;version="[2.7,3)",org.apache.cxf.feature;
version="[2.7,3)",org.apache.cxf.interceptor;version="[2.7,3)",org.osgi
.service.blueprint;version="[1.0.0,2.0.0)"
Tool: Bnd-1.50.0

This problem was solved after some manual intervention and not entirely by using the OBR of fabric8. The appropriate features need to be included in the POM file and they also need to be installed through the POM file. This was a pretty involved exercise. A better way should be provided by Redhat for the JBoss Fuse to bring down the deployment time.

Related

Using CASE in PostgreSQL to search for each values in column and return the output with filter

There is a column with different values like below :
Ava avtar 18.1.100-33_HF305143
app agent 19.9.0.99 (root-2021-323)
BOOST:1.3.0.0-12345 FUSE:2.9.4 ora_dw05_plm10
BOOST:1.3.0.0-12345 FUSE:2.9.4 tar
BOOST:1.3.0.0-12345 FUSE:2.9.4 scp
BOOST:1.3.0.0-12345 FUSE:2.9.7 /usr/pgsql-10/bin/pg_dump
BOOST:1.3.0.1-12345 CBFS 6.1 CVMountd.exe
PP-19.9.0-13-18087
______ ddrmaint 7.5.0-183
________ app agent 4.5.0.0 (52)
In the output when I query using select, I should get as below after filter the column :
Ava avtar 18.1.100
app agent 19.9.0.99
BOOST:1.3.0.0-12345 FUSE:2.9.4
BOOST:1.3.0.0-12345 FUSE:2.9.4
BOOST:1.3.0.0-12345 FUSE:2.9.4
BOOST:1.3.0.0-12345 FUSE:2.9.7
BOOST:1.3.0.1-12345 CBFS 6.1
PP-19.9.0-13
______ ddrmaint 7.5.0
________ app agent 4.5.0.0
I'm trying to use select with CASE for this and not going forward. Please let me know the solution for the same.
select
CASE
WHEN 'PP-19.9.0-13-18087' ~ 'PP' THEN split_part('PP-19.9.0-13-18087', '-', 1)
WHEN 'BOOST:1.3.0.0-12345 FUSE:2.9.4 scp' ~ 'BOOST' THEN split_part('BOOST:1.3.0.0-12345 FUSE:2.9.4 scp', ':', 1)
END
Here is a solution using various tools:split_part, substr, left, reverse.
create table t ( value varchar(100));
insert into t values
('Ava avtar 18.1.100-33_HF305143'),
('app agent 19.9.0.99 (root-2021-323)'),
('BOOST:1.3.0.0-12345 FUSE:2.9.4 ora_dw05_plm10'),
('BOOST:1.3.0.0-12345 FUSE:2.9.4 tar'),
('BOOST:1.3.0.0-12345 FUSE:2.9.4 scp'),
('BOOST:1.3.0.0-12345 FUSE:2.9.7 /usr/pgsql-10/bin/pg_dump'),
('BOOST:1.3.0.1-12345 CBFS 6.1 CVMountd.exe'),
('PP-19.9.0-13-18087'),
('______ ddrmaint 7.5.0-183'),
('________ app agent 4.5.0.0 (52)');
✓
10 rows affected
select
value,
length(value),
case left(value,2)
when 'Av' then split_part(value, '-', 1)
when 'ap' then split_part(value, '(', 1)
when 'BO' then case
when value ~ 'BOOST:1(\.\d)+ FUSE' then left(value,30)
else left(value,28)
end
when 'PP' then reverse(substr(reverse(value),strpos(reverse(value),'-')+1,length(value)))
when '__' then case
when value ~ 'ddrmaint' then left(value,21)
else left(value,26)
end
else value
end as processed_value
from t
value | length | processed_value
:------------------------------------------------------- | -----: | :---------------------------
Ava avtar 18.1.100-33_HF305143 | 30 | Ava avtar 18.1.100
app agent 19.9.0.99 (root-2021-323) | 35 | app agent 19.9.0.99
BOOST:1.3.0.0-12345 FUSE:2.9.4 ora_dw05_plm10 | 45 | BOOST:1.3.0.0-12345 FUSE:2.9
BOOST:1.3.0.0-12345 FUSE:2.9.4 tar | 34 | BOOST:1.3.0.0-12345 FUSE:2.9
BOOST:1.3.0.0-12345 FUSE:2.9.4 scp | 34 | BOOST:1.3.0.0-12345 FUSE:2.9
BOOST:1.3.0.0-12345 FUSE:2.9.7 /usr/pgsql-10/bin/pg_dump | 56 | BOOST:1.3.0.0-12345 FUSE:2.9
BOOST:1.3.0.1-12345 CBFS 6.1 CVMountd.exe | 41 | BOOST:1.3.0.1-12345 CBFS 6.1
PP-19.9.0-13-18087 | 18 | PP-19.9.0-13
______ ddrmaint 7.5.0-183 | 25 | ______ ddrmaint 7.5.0
________ app agent 4.5.0.0 (52) | 31 | ________ app agent 4.5.0.0
*db<>fiddle here

complex canvas getting stuck in the middle

Setup:
Celery 4.1.0, broker=RabbitMQ 3.6.5, backend=Redis 3.2.5
Consider the following canvas:
celery worker -A worker.celeryapp:app -l info -Q default -c 2 -n defaultworker#%h -Ofair
#app.task(name='task_1',
bind=True,
base=MyConnectionHolderTask)
def task_1(self, feed_id, flow_id, **kwargs):
do_something()
task_1 = t_1.si(feed_id, flow_id)
.
.
task_13 = t_13.si(feed_id, flow_id)
(task_1 |
group((task_2 | group(task_3, task_4)),
task_5,
task_6,
task_7,
task_8) |
task_9 |
task_10 |
task_11 |
task_12 |
task_13).apply_async(link_error=unlock)
means I have chain of tasks which one of its tasks is a group of several tasks, and one of them is chain of size 2 (with latter task as group of 2).
Expected behavior
all task succeeded so expecting finish until task_13
Actual behavior
task_4 is the last to run. task_9 and the rest (10..13) doesn't run.
if i cancel the group of task_3 & task_4 it does work (till 13):
(task_1 |
group((task_2 | task_3 | task_4),
task_5,
task_6,
task_7,
task_8) |
task_9 |
task_10 |
task_11 |
task_12 |
task_13).apply_async(link_error=unlock)
Ref: Issue in github

Grails audit logging plugin for mongodb is not working

I am using grails 2.2.3 , mongodb 1.3.3 the curd operation is working fine.
I want to log my curd operation
so i use audit-logging plugin "audit-logging:1.0.0",it work fine with mysql-database but not with mongodb.It shows
Error 2014-05-05 15:45:04,117 [localhost-startStop-1] ERROR context.GrailsContextLoader - Error initializing the application: Cannot get property 'datastores' on null object
Message: Cannot get property 'datastores' on null object
Line | Method
->> 90 | doCall in AuditLoggingGrailsPlugin$_closure1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 303 | innerRun in java.util.concurrent.FutureTask$Sync
| 138 | run . . in java.util.concurrent.FutureTask
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run . . in ''
^ 662 | run in java.lang.Thread
Any one came across this issue.
help me to solve this.
Thanks in advance. cheers..
I suggest your report the issue http://jira.grails.org/browse/GPAUDITLOGGING

Grails 2 and mongodb not working

I am using Grails 2.2.0 and MongoDB. I have configured Grails to run against MongoDB instead of the default H2 in memory database. From the error message h2 seems to be involved even though I think I removed it.
My DataSource.groovy:
grails {
mongo {
host = "localhost"
port = 27017
databaseName = "physicians"
}
}
My BuildConfig.groovy:
plugins {
runtime ":hibernate:$grailsVersion"
runtime ":jquery:1.8.0"
runtime ":resources:1.1.6"
// Uncomment these (or add new ones) to enable additional resources capabilities
//runtime ":zipped-resources:1.0"
//runtime ":cached-resources:1.0"
//runtime ":yui-minify-resources:0.1.4"
build ":tomcat:$grailsVersion"
runtime ":database-migration:1.1"
compile ':cache:1.0.0'
compile ':mongodb:1.1.0.GA'
}
The error I get when i want to save a domain object Artist is:
| Error 2013-01-03 22:33:18,881 [http-bio-9090-exec-1] ERROR util.JDBCExceptionReporter - Table "ARTIST" not found; SQL statement:
insert into artist (id, version, artist_name, birth_name) values (null, ?, ?, ?) [42102-164]
| Error 2013-01-03 22:33:19,050 [http-bio-9090-exec-1] ERROR errors.GrailsExceptionResolver - JdbcSQLException occurred when processing request: [GET] /musicstack/artist/
Table "ARTIST" not found; SQL statement:
insert into artist (id, version, artist_name, birth_name) values (null, ?, ?, ?) [42102-164]. Stacktrace follows:
Message: Table "ARTIST" not found; SQL statement:
insert into artist (id, version, artist_name, birth_name) values (null, ?, ?, ?) [42102-164]
Line | Method
->> 329 | getJdbcSQLException in org.h2.message.DbException
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 169 | get in ''
| 146 | get . . . . . . . . in ''
| 4753 | readTableOrView in org.h2.command.Parser
| 4731 | readTableOrView . . in ''
| 954 | parseInsert in ''
| 375 | parsePrepared . . . in ''
| 279 | parse in ''
| 251 | parse . . . . . . . in ''
| 217 | prepareCommand in ''
| 415 | prepareLocal . . . in org.h2.engine.Session
| 364 | prepareCommand in ''
| 1121 | prepareCommand . . in org.h2.jdbc.JdbcConnection
| 71 | <init> in org.h2.jdbc.JdbcPreparedStatement
| 267 | prepareStatement . in org.h2.jdbc.JdbcConnection
| 1051 | prepareStatement in ''
| 508 | prepareStatement . in org.apache.commons.dbcp.DelegatingConnection
| 400 | prepareStatement in org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
| 7 | index . . . . . . . in musicstack.ArtistController
| 195 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter . . . . . in grails.plugin.cache.web.filter.AbstractFilter
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run . . . . . . . . in ''
^ 680 | run in java.lang.Thread
What am I missing here?
Best regards /Lasse
====================================
Got it working.
First I had to remove the line
runtime ":hibernate:$grailsVersion"
from the BuildConfig.groovy
When I did that I got this:
| Error Fatal error during compilation org.apache.tools.ant.BuildException:
java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration
(NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
I then removed the line
runtime ":database-migration:1.1"
from BuildConfig.groovy
This last part was not found when searching to solve this problem. Is this the way it is supposed to be done?
/Lasse
To use mongodb gorm stand alone in your project, you need to comment out
compile ':cache:1.0.0'
in your BuildConfig, because cache plugin depends on hibernate. You can find it in the source code as:
plugins {
....
runtime(":hibernate:$grailsVersion") {
export = false
}
....
}
I had to remove Hibernate plugin from application.properties too for it to work. I am not sure why hibernate plugin was configured in application.properties
You had uninstalled the hibernate, so you need another plugin about mongodb.
you cound add a line
compile ':mongodb:1.0.0.GA'
from BuildConfig.groovy instead of
runtime ":hibernate:$grailsVersion"

Where can I find the documentation for MicroStrategy Command Manager

Where can I find the documentation for MicroStrategy Command Manager? I've look through various docs that I have but not able to find any comprehensive list of commands. Particularly, I need to know a list of commands to create attributes and metrics.
Thanks
The best way to find the list of available commands is to use the Outlines option, available inside Command Manager.
To create an attribute use the following syntax:
CREATE ATTRIBUTE "<attribute_name>" [DESCRIPTION "<description>"] [LONGDESCRIPTION "<long_description>"] IN [FOLDER] "<location_path>" [HIDDEN (TRUE | FALSE)] ATTRIBUTEFORM "<form_name>" [FORMCATEGORY "<category_name>"] [FORMDESC "<form_description>"] [FORMTYPE (NUMBER | TEXT | DATETIME | DATE | TIME | URL | EMAIL | HTML | PICTURE | BIGDECIMAL | PHONENUMBER)] [REPORTSORT (NONE | ASC | DESC)] [BROWSESORT (NONE | ASC | DESC)] EXPRESSION "<form_expression>" [MAPPINGMODE (AUTOMATIC | MANUAL)] [EXPSOURCETABLES "<sourcetable1>" [, "<sourcetable2>" ...]] LOOKUPTABLE "<lookup_table>" FOR PROJECT "<project_name>";
and for metrics creation:
CREATE METRIC "<metric_name>" IN [FOLDER] "<location_path>" EXPRESSION "<expression>" [DESCRIPTION "<description>"] [LONGDESCRIPTION "<long_description>"] [HIDDEN (TRUE | FALSE)] [ALLOWSMARTMETRIC (TRUE | FALSE)] [REMOVEREPORTFILTERELEMENTS (TRUE | FALSE)] [TOTALSUBTOTALFUNCTION (AVERAGE | COUNT | DEFAULT| GEOMETRICMEAN | MAXIMUM | MEDIAN | MINIMUM | MODE | NONE | PRODUCT | STANDARDDEVIATION | SUM | VARIANCE)] [DYNAMICAGGREGATIONFUNCTION (AVERAGE | COUNT | DEFAULT| GEOMETRICMEAN | MAXIMUM | MEDIAN | MINIMUM | MODE | NONE | PRODUCT | STANDARDDEVIATION | SUM | VARIANCE)] [COLUMNALIAS "<columnalias>"] FOR PROJECT "<project_name>";
Some simple examples provided bellow (again from the outlines available inside command manager):
CREATE ATTRIBUTE "Day" DESCRIPTION "Duplicate of Day Attribute from folder \Time" IN FOLDER "\Schema Objects\Attributes" ATTRIBUTEFORM "ID" FORMCATEGORY "ID" FORMDESC "Basic ID form" FORMTYPE TEXT REPORTSORT ASC EXPRESSION "[DAY_DATE]" LOOKUPTABLE "LU_DAY" FOR PROJECT "MicroStrategy Tutorial";
CREATE METRIC "New Metric" IN FOLDER "\Public Objects\Metrics\Count Metrics" EXPRESSION "Count(Customer) {Country} <[Western United States Customers]>" FOR PROJECT "MicroStrategy Tutorial";
As Bruno said, the Outlines option gives you all the templates that there are in Command Manager, which you can build together and define to do what you want. If in doubt, check out the "MicroStrategy System Administration Guide" product manual, which covers all you need to know on command manager.
Here is one useful site with Command Manager documentation:
https://metacpan.org/pod/Business::Intelligence::MicroStrategy::CommandManager